Cleanup old OS-support and simplify vars (#458)

* use os_family instead of distribution for debian systems

Signed-off-by: rndmh3ro <[email protected]>

* remove tasks related to rhel6 or debian 6

Signed-off-by: rndmh3ro <[email protected]>
This commit is contained in:
Sebastian Gumprich authored and GitHub committed 2021-06-30 13:09:46 +02:00
1 parent 72ec118a6d
commit 4ca4f09453
8 files changed
+6 -25

No files matched your search

+3 -4
View File
@@ -58,7 +58,7 @@
ignoreerrors: true
with_dict: '{{ sysctl_config }}'
- name: Change various sysctl-settings on rhel6-hosts or older, look at the sysctl-vars file for documentation
- name: Change various sysctl-settings on Amazon Linux, look at the sysctl-vars file for documentation
sysctl:
name: '{{ item.key }}'
value: '{{ item.value }}'
@@ -66,8 +66,7 @@
reload: true
ignoreerrors: true
with_dict: '{{ sysctl_rhel_config }}'
when: ((ansible_facts.distribution in ['CentOS', 'Fedora', 'RedHat']) and
ansible_distribution_version|int is version('7', '<')) or ansible_facts.distribution == 'Amazon'
when: ansible_facts.distribution == 'Amazon'
when: ansible_virtualization_type not in ['docker', 'lxc', 'openvz']
@@ -78,5 +77,5 @@
mode: '0644'
when:
- ufw_manage_defaults
- ansible_facts.distribution in ['Debian', 'Ubuntu']
- ansible_facts.os_family == 'Debian'
tags: ufw