Initial commit

This commit is contained in:
Nils Cant
2019-08-28 11:15:00 +02:00
parent 827e5cd149
commit 8fee45bafa
6 changed files with 70 additions and 0 deletions

13
templates/rules-v4.j2 Normal file
View File

@@ -0,0 +1,13 @@
# {{ ansible_managed }}
{% for table in iptables_rules_v4 %}
*{{ table }}
{% for chain in iptables_rules_v4[table] %}
:{{ chain }} {{ iptables_rules_v4[table][chain]['policy'] | default('ACCEPT') }} [0:0]
{% if iptables_rules_v4[table][chain]['rules'] is defined %}
{% for rule in iptables_rules_v4[table][chain]['rules'] %}
-A {{ chain }} {{ rule }}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
COMMIT