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
1 changed files with 20 additions and 6 deletions

View File

@ -34,12 +34,26 @@
- whoopsie # CIS 4.1
- apport # CIS 4.1
- name: Remove annoying packages
apt: pkg={{ item }} state=absent purge=yes
loop:
- command-not-found
- command-not-found-data
- python3-commandnotfound
- name: Set fact for annoying packages
set_fact:
ubuntu_annoying_packages:
- command-not-found
- command-not-found-data
- 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
import_tasks: cron-apt.yml