# firewall definitions for physical servers
-class firewall {
+class firewall(
+ $local_net = hiera('firewall::local_net', false),
+) {
class { 'shorewall': }
- $rfc1918 = $shorewall_local_net ? {
+ $rfc1918 = $local_net ? {
true => true,
false => false,
default => false,
options => "default",
}
- if $shorewall_local_net {
- class { "firewall::local":
- network => $shorewall_local_net_network,
- interface => $shorewall_local_net_iface,
- manage_host => $shorewall_local_net_manage_host,
- manage_interface => $shorewall_local_net_manage_iface,
- }
+ if $local_net {
+ class { "firewall::local": }
}
}
-class firewall::local($network = '192.168.1.0/24', $interface = 'eth0', $manage_host = true, $manage_interface = false) {
+class firewall::local(
+ $network = hiera('firewall::local::network, '192.168.1.0/24'),
+ $interface = hiera('firewall::local::interface', 'eth0'),
+ $manage_host = hiera('firewall::local::manage_host', True),
+ $manage_interface = hiera('firewall::local::manage_iface, false)
+) {
if $manage_host {
shorewall::host { "$interface-loc":