Adding comment option to iptables rule
Change-Id: I9d93052cfc197a364b42240448344d5543e8805f
diff --git a/README.rst b/README.rst
index 1f59c08..7fbd803 100644
--- a/README.rst
+++ b/README.rst
@@ -88,6 +88,7 @@
destination_port: 22
source_network: 192.168.1.0/24
jump: ACCEPT
+ comment: Blah
IPv6 is supported as well
diff --git a/iptables/_rule.sls b/iptables/_rule.sls
index ebce336..b08fbb0 100644
--- a/iptables/_rule.sls
+++ b/iptables/_rule.sls
@@ -20,6 +20,9 @@
{%- if rule.match is defined %}
- match: {{ rule.match }}
{%- endif %}
+ {%- if rule.comment is defined %}
+ - comment: {{ rule.comment }}
+ {%- endif %}
{%- if rule.connection_state is defined %}
- connstate: {{ rule.connection_state }}
{%- endif %}
diff --git a/tests/pillar/iptables_server.sls b/tests/pillar/iptables_server.sls
index 7ef038d..b6a1219 100644
--- a/tests/pillar/iptables_server.sls
+++ b/tests/pillar/iptables_server.sls
@@ -10,4 +10,4 @@
destination_port: 8088
source_network: 127.0.0.1
jump: ACCEPT
-
+ comment: Blah