summaryrefslogtreecommitdiff
path: root/puppet/modules/shorewall/manifests/interface.pp
blob: 403ee749e12ed6fd02405ef61920ea8df3c6a294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
define shorewall::interface(
    $zone,
    $broadcast = 'detect',
    $options = 'tcpflags,blacklist,routefilter,nosmurfs,logmartians',
    $add_options = '',
    $rfc1918 = false,
    $dhcp = false,
    $order = 100
){
    $added_opts = $add_options ? {
        ''      => '',
        default => ",${add_options}",
    }

    $dhcp_opt = $dhcp ? {
        false   => '',
        default => ',dhcp',
    }

    $rfc1918_opt = $rfc1918 ? {
        false   => ',norfc1918',
        default => '',
    }

    shorewall::entry { "interfaces-${order}-${name}":
        line => "${zone} ${name} ${broadcast} ${options}${dhcp_opt}${rfc1918_opt}${added_opts}",
    }
}