From ee585a6ac4b0b9838c67308113d44a09a875c97e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 22 Mar 2019 17:28:06 +0100 Subject: [PATCH] Fix the packages installation task. --- iptables/defaults/main.yml | 4 ++++ iptables/tasks/main.yml | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) 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