]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/templates/default/shorewall-rules.erb
Add helper support to firewall_rule
[chef.git] / cookbooks / networking / templates / default / shorewall-rules.erb
index 8567a8d5a321ff5a6f9bd0376ed000cd01d26fbf..660eec13071dbb310817a97fd259e97fb332c471 100644 (file)
@@ -1,9 +1,13 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
+<% if node[:lsb][:release].to_f >= 16.04 -%>
 ?SECTION NEW
+<% else -%>
+SECTION NEW
+<% end -%>
 
-# ACTION       SOURCE  DEST    PROTO           DEST            SOURCE  ORIGINAL        RATE
-#                                              PORTS           PORTS   DEST            LIMIT
-<% @rules.each do |r| -%>
-<%= r[:action] %>              <%= r[:source] %>       <%= r[:dest] %> <%= r[:proto] %>                <%= r[:dest_ports] %>   <%= r[:source_ports] %> -       <%= r[:rate_limit] %>
+# ACTION       SOURCE    DEST  PROTO           DEST            SOURCE  ORIGINAL        RATE    USER/   MARK    CONNLIMIT  TIME  HEADERS  SWITCH  HELPER
+#                                              PORTS           PORTS   DEST            LIMIT   GROUP
+<% node[:networking][:firewall][@family].each do |r| # ~FC034 -%>
+<%= r[:action] %>              <%= r[:source] %>       <%= r[:dest] %> <%= r[:proto] %>                <%= r[:dest_ports] %>   <%= r[:source_ports] %> -       <%= r[:rate_limit] %>   -       -       <%= r[:connection_limit] %> -   -       - <%= r[:helper] %>
 <% end -%>