diff --git a/iptables/defaults/main.yml b/iptables/defaults/main.yml index 9da4e534..47261772 100644 --- a/iptables/defaults/main.yml +++ b/iptables/defaults/main.yml @@ -1,4 +1,8 @@ --- +iptables_deb_pkgs: + - iptables + - iptables-persistent + # # Reference only. Check the iptables-rules.v4.j2 for the list of accepted variables # diff --git a/iptables/tasks/main.yml b/iptables/tasks/main.yml index 06ea7fa6..5441f837 100644 --- a/iptables/tasks/main.yml +++ b/iptables/tasks/main.yml @@ -1,10 +1,7 @@ --- - block: - name: Install the needed iptables packages - apt: pkg={{ item }} state=present - with_items: - - iptables - - iptables-persistent + apt: pkg={{ iptables_deb_pkgs }} state=present cache_valid_time=1800 - name: Create the /etc/iptables directory when needed file: dest=/etc/iptables state=directory owner=root group=root mode=0755