Merge pull request 'Disable apport, and remove lxd by default' (#230) from adellam/ansible-roles:master into master

This commit is contained in:
Andrea Dell'Amico 2020-10-17 17:14:06 +02:00
commit 9c90c01808
5 changed files with 23 additions and 8 deletions

View File

@ -70,6 +70,7 @@ cleanup_base_packages: True
base_packages_to_remove: base_packages_to_remove:
- ppp - ppp
- at - at
- snapd
cleanup_x_base_packages: False cleanup_x_base_packages: False
x_base_packages_to_remove: x_base_packages_to_remove:
@ -92,6 +93,12 @@ exim_email_server_pkgs:
- exim4-config - exim4-config
- exim4-daemon-light - exim4-daemon-light
disable_apport_service: True
ubuntu_remove_lxd: True
ubuntu_lxd_pkgs:
- lxd
- lxcfs
disable_some_not_needed_services: False disable_some_not_needed_services: False
services_to_be_disabled: services_to_be_disabled:
- rpcbind - rpcbind
@ -150,12 +157,6 @@ default_security_limits: '{{ root_security_limits }}'
# #
# debian/ubuntu distributions controllers # debian/ubuntu distributions controllers
# #
has_default_grub: "'{{ ansible_distribution }}' == 'Debian' and '{{ ansible_distribution_version }}' != 'lenny/sid' and {{ ansible_distribution_major_version }} >= 6"
has_htop: "'{{ ansible_distribution }}' == 'Ubuntu' and ({{ ansible_distribution_version }} == 10.10 or {{ ansible_distribution_version }} == 11.04 or {{ ansible_distribution_version }} == 12.04)"
has_apt: "('{{ ansible_distribution }}' == 'Debian' or '{{ ansible_distribution }}' == 'Ubuntu') and '{{ ansible_distribution_version }}' != 'lenny/sid' and '{{ ansible_distribution_major_version }}' >= 5"
has_fail2ban: "(('{{ ansible_distribution }}' == 'Ubuntu') and ({{ ansible_distribution_major_version }} >= 14)) or (('{{ ansible_distribution }}' == 'Debian') and ({{ ansible_distribution_major_version }} >= 8))" has_fail2ban: "(('{{ ansible_distribution }}' == 'Ubuntu') and ({{ ansible_distribution_major_version }} >= 14)) or (('{{ ansible_distribution }}' == 'Debian') and ({{ ansible_distribution_major_version }} >= 8))"
is_debian: "'{{ ansible_distribution }}' == 'Debian'" is_debian: "'{{ ansible_distribution }}' == 'Debian'"

View File

@ -1,6 +1,6 @@
--- ---
- name: setup apt cache - name: setup apt cache
template: src=02proxy.j2 dest=/etc/apt/apt.conf.d/02proxy template: src=02proxy.j2 dest=/etc/apt/apt.conf.d/02proxy
when: has_apt when: ansible_distribution_file_variety == "Debian"
tags: tags:
- aptproxy - aptproxy

View File

@ -4,3 +4,11 @@
with_items: '{{ services_to_be_disabled }}' with_items: '{{ services_to_be_disabled }}'
when: disable_some_not_needed_services when: disable_some_not_needed_services
tags: [ 'bootstrap', 'disable_services' ] tags: [ 'bootstrap', 'disable_services' ]
- name: Disable some unneeded services
service: name=apport state=stopped enabled=no
when:
- disable_apport_service
- ansible_distribution == "Ubuntu"
- ansible_distribution_version is version_compare('18.04', '<')
tags: [ 'bootstrap', 'disable_services', 'apport' ]

View File

@ -1,7 +1,7 @@
--- ---
- name: install munin-node - name: install munin-node
apt: pkg=munin-node state=present apt: pkg=munin-node state=present
when: has_apt when: ansible_distribution_file_variety == "Debian"
tags: tags:
- packages - packages
- munin - munin

View File

@ -26,3 +26,9 @@
when: cleanup_exim_email_server when: cleanup_exim_email_server
tags: [ 'packages', 'pkg_cleanup', 'exim' ] tags: [ 'packages', 'pkg_cleanup', 'exim' ]
- name: Remove LXD
apt: name={{ ubuntu_lxd_pkgs }} state=absent
when: ubuntu_remove_lxd
tags: [ 'packages', 'pkg_cleanup', 'lxd' ]