Fix the packages installation task.

This commit is contained in:
Andrea Dell'Amico 2019-03-22 17:28:06 +01:00
parent 66bb6e3db4
commit ee585a6ac4
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,8 @@
---
iptables_deb_pkgs:
- iptables
- iptables-persistent
#
# Reference only. Check the iptables-rules.v4.j2 for the list of accepted variables
#

View File

@ -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