diff --git a/tasks/main.yml b/tasks/main.yml index 49fc57b..a4807d8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -11,7 +11,8 @@ - name: install required software package: name: "{{ firewall_packages['required'][ansible_distribution] - | default(firewall_packages['required']['default']) }}" + | default(firewall_packages['required'][ansible_distribution ~ '-' ~ ansible_distribution_major_version] + | default(firewall_packages['required']['default'])) }}" state: "{{ firewall_package_state }}" when: - firewall_packages.required is defined diff --git a/vars/main.yml b/vars/main.yml index 185a2a6..22ad878 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -9,7 +9,8 @@ firewall_packages: CentOS-6: - iptables CentOS-7: - - firewalld + - iptables + - iptables-services Fedora: - firewalld openSUSE Leap: @@ -22,11 +23,9 @@ firewall_packages: Alpine: - firewalld - ufw - CentOS-6: + CentOS: - firewalld - ufw - CentOS-7: - - ufw Fedora: - ufw openSUSE Leap: