aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorTim Meusel <tim@bastelfreak.de>2019-09-12 10:41:16 +0200
committerGitHub <noreply@github.com>2019-09-12 10:41:16 +0200
commit439e71b110e769d8164c4491a6662ac6f2b089db (patch)
tree973fbd182591fd9b6745ddb0678ac5cd10b4e973 /manifests
parent1a417a652142302fdd62534a0d5220c8b7b2304d (diff)
parent8e4920c3ceef338432fa01f1f8d2f6597f9fff05 (diff)
downloadpuppet-ferm-439e71b110e769d8164c4491a6662ac6f2b089db.tar.gz
puppet-ferm-439e71b110e769d8164c4491a6662ac6f2b089db.tar.bz2
Merge pull request #68 from foxxx0/collect-chains-from-hiera
expose parameter to initialize custom chains
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index d2251c9..2f5e1ef 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -55,6 +55,9 @@
# @param rules A hash that holds all data for ferm::rule
# Default value: Empty Hash
# Allowed value: Any Hash
+# @param chains A hash that holds all data for ferm::chain
+# Default value: Empty Hash
+# Allowed value: Any Hash
# @param forward_log_dropped_packets Enable/Disable logging in the FORWARD chain of packets to the kernel log, if no explicit chain matched
# Default value: false
# Allowed values: (true|false)
@@ -84,6 +87,7 @@ class ferm (
Boolean $output_log_dropped_packets,
Boolean $input_log_dropped_packets,
Hash $rules,
+ Hash $chains,
Array[Enum['ip','ip6']] $ip_versions,
Hash[String[1],Array[String[1]]] $preserve_chains_in_tables,
) {
@@ -98,6 +102,12 @@ class ferm (
Ferm::Chain <| |>
~> Class['ferm::service']
+ $chains.each |$chainname, $attributes| {
+ ferm::chain{$chainname:
+ * => $attributes,
+ }
+ }
+
$rules.each |$rulename, $attributes| {
ferm::rule{$rulename:
* => $attributes,