Commit 598ef555 authored by mh's avatar mh

make it possible to create resources from hiera

parent 89942a86
......@@ -8,7 +8,43 @@ class shorewall(
$tor_user = $::operatingsystem ? {
'Debian' => 'debian-tor',
default => 'tor'
}
},
$zones = {},
$zones_defaults = {},
$interfaces = {},
$interfaces_defaults = {},
$hosts = {},
$hosts_defaults = {},
$policy = {},
$policy_defaults = {},
$rules = {},
$rules_defaults = {},
$rulesections = {},
$rulesections_defaults = {},
$masq = {},
$masq_defaults = {},
$proxyarp = {},
$proxyarp_defaults = {},
$nat = {},
$nat_defaults = {},
$blacklist = {},
$blacklist_defaults = {},
$rfc1918 = {},
$rfc1918_defaults = {},
$routestopped = {},
$routestopped_defaults = {},
$params = {},
$params_defaults = {},
$tcdevices = {},
$tcdevices_defaults = {},
$tcrules = {},
$tcrules_defaults = {},
$tcclasses = {},
$tcclasses_defaults = {},
$tunnels = {},
$tunnels_defaults = {},
$rtrules = {},
$rtrules_defaults = {},
) {
case $::operatingsystem {
......@@ -63,4 +99,24 @@ class shorewall(
'mangle',
]:;
}
create_resources('shorewall::zone',$zones,$zones_defaults)
create_resources('shorewall::interface',$interfaces,$interfaces_defaults)
create_resources('shorewall::host',$hosts,$hosts_defaults)
create_resources('shorewall::policy',$policy,$policy_defaults)
create_resources('shorewall::rule',$rules,$rules_defaults)
create_resources('shorewall::rule_section',$rulesections,$rulesections_defaults)
create_resources('shorewall::masq',$masq,$masq_defaults)
create_resources('shorewall::proxyarp',$proxyarp,$proxyarp_defaults)
create_resources('shorewall::nat',$nat,$nat_defaults)
create_resources('shorewall::blacklist',$blacklist,$blacklist_defaults)
create_resources('shorewall::rfc1918',$rfc1918,$rfc1918_defaults)
create_resources('shorewall::routestopped',$routestopped,
$routestopped_defaults)
create_resources('shorewall::params',$params,$params_defaults)
create_resources('shorewall::tcdevices',$tcdevices,$tcdevices_defaults)
create_resources('shorewall::tcrules',$tcrules,$tcrules_defaults)
create_resources('shorewall::tcclasses',$tcclasses,$tcclasses_defaults)
create_resources('shorewall::tunnel',$tunnels,$tunnels_defaults)
create_resources('shorewall::rtrules',$rtrules,$rtrules_defaults)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment