roles/common: Remove more annoying packages on Ubuntu

Ubuntu 16.04 and up install a bunch of their technologies that I'm
not using, like lxc, lxd, and snaps.
This commit is contained in:
Alan Orth 2018-12-20 09:31:58 +02:00
parent 944c99102f
commit 46bbb06527
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -34,13 +34,27 @@
- whoopsie # CIS 4.1 - whoopsie # CIS 4.1
- apport # CIS 4.1 - apport # CIS 4.1
- name: Remove annoying packages - name: Set fact for annoying packages
apt: pkg={{ item }} state=absent purge=yes set_fact:
loop: ubuntu_annoying_packages:
- command-not-found - command-not-found
- command-not-found-data - command-not-found-data
- python3-commandnotfound - python3-commandnotfound
- name: Set fact for more annoying packages
set_fact:
ubuntu_more_annoying_packages:
- snapd
- lxd
- lxd-client
- liblxc1
- lxc-common
- lxcfs
when: ansible_distribution_version is version_compare('16.04', '>=')
- name: Remove more annoying packages
apt: name={{ ubuntu_annoying_packages | union(ubuntu_more_annoying_packages) }} state=absent purge=yes
- name: Configure cron-apt - name: Configure cron-apt
import_tasks: cron-apt.yml import_tasks: cron-apt.yml
tags: cron-apt tags: cron-apt