Update upstream cookbooks

This commit is contained in:
Greg Karékinian
2017-03-20 13:19:10 +00:00
parent bfd2d52ea8
commit bcfd44b923
340 changed files with 12576 additions and 5465 deletions

View File

@@ -78,8 +78,9 @@ module FirewallCookbook
contents << "# position #{sorted_value}"
rules.each do |k, v|
next unless v == sorted_value
contents << if k.start_with?('COMMIT')
'COMMIT'
contents << if repeatable_directives(k)
k[/[^_]+/]
else
k
end
@@ -87,5 +88,13 @@ module FirewallCookbook
end
"#{contents.join("\n")}\n"
end
def repeatable_directives(s)
%w(:OUTPUT :INPUT :POSTROUTING :PREROUTING COMMIT).each do |special|
return true if s.start_with?(special)
end
false
end
end
end