Merge "Fix conflicting IDs in iptables formula"
diff --git a/iptables/v1/v4_service.sls b/iptables/v1/v4_service.sls
index 41deedf..df81edc 100644
--- a/iptables/v1/v4_service.sls
+++ b/iptables/v1/v4_service.sls
@@ -6,7 +6,7 @@
pkg.installed:
- names: {{ service.v4.pkgs }}
-iptables_modules_v4_load:
+iptables_modules_load_v4:
kmod.present:
- persist: true
- mods: {{ service.v4.modules }}
@@ -25,22 +25,23 @@
{% if grains['os'] == 'Ubuntu' %}
-iptables_services_v4_start:
+iptables_services_start_v4:
cmd.run:
- name: find /usr/share/netfilter-persistent/plugins.d/[0-9]*-ip4tables -exec {} start \;
- onlyif: test $(iptables-save | wc -l) -eq 0
- require:
- file: {{ service.v4.persistent_config }}
- - kmod: iptables_modules_v4_load
+ - kmod: iptables_modules_load_v4
{%- endif %}
-{{ service.v4.service }}:
+{{ service.v4.service }}_v4:
service.running:
+ - name: {{ service.v4.service }}
- enable: true
- require:
- file: {{ service.v4.persistent_config }}
- - kmod: iptables_modules_v4_load
+ - kmod: iptables_modules_load_v4
- watch:
- file: {{ service.v4.persistent_config }}
@@ -57,7 +58,7 @@
{% if grains['os'] == 'Ubuntu' %}
-iptables_services_v4_stop:
+iptables_services_stop_v4:
cmd.run:
- name: find /usr/share/netfilter-persistent/plugins.d/[0-9]*-ip4tables -exec {} flush \;
- onlyif: test $(which iptables-save) -eq 0 && test $(iptables-save | wc -l) -ne 0
@@ -65,7 +66,7 @@
{{ service.v4.persistent_config }}:
file.absent:
- require:
- - cmd: iptables_services_v4_stop
+ - cmd: iptables_services_stop_v4
iptables_tables_flush_v4:
module.wait:
diff --git a/iptables/v1/v6_service.sls b/iptables/v1/v6_service.sls
index 1bea52c..256a5a7 100644
--- a/iptables/v1/v6_service.sls
+++ b/iptables/v1/v6_service.sls
@@ -6,7 +6,7 @@
pkg.installed:
- names: {{ service.v6.pkgs }}
-iptables_modules_v6_load:
+iptables_modules_load_v6:
kmod.present:
- persist: true
- mods: {{ service.v6.modules }}
@@ -25,22 +25,23 @@
{% if grains['os'] == 'Ubuntu' %}
-iptables_services_v6_start:
+iptables_services_start_v6:
cmd.run:
- name: find /usr/share/netfilter-persistent/plugins.d/[0-9]*-ip6tables -exec {} start \;
- onlyif: test $(ip6tables-save | wc -l) -eq 0
- require:
- file: {{ service.v6.persistent_config }}
- - kmod: iptables_modules_v6_load
+ - kmod: iptables_modules_load_v6
{%- endif %}
-{{ service.v6.service }}:
+{{ service.v6.service }}_v6:
service.running:
+ - name: {{ service.v6.service }}
- enable: true
- require:
- file: {{ service.v6.persistent_config }}
- - kmod: iptables_modules_v6_load
+ - kmod: iptables_modules_load_v6
- watch:
- file: {{ service.v6.persistent_config }}
@@ -57,7 +58,7 @@
{% if grains['os'] == 'Ubuntu' %}
-iptables_services_v6_stop:
+iptables_services_stop_v6:
cmd.run:
- name: find /usr/share/netfilter-persistent/plugins.d/[0-9]*-ip6tables -exec {} flush \;
- onlyif: test $(which ip6tables-save) -eq 0 && test $(ip6tables-save | wc -l) -ne 0
@@ -65,7 +66,7 @@
{{ service.v6.persistent_config }}:
file.absent:
- require:
- - cmd: iptables_services_v6_stop
+ - cmd: iptables_services_stop_v6
iptables_tables_flush_v6:
module.wait: