interface.pp 522 Bytes
Newer Older
1 2 3
define shorewall::interface(
    $zone,
    $broadcast = 'detect',
Matt Taggart's avatar
Matt Taggart committed
4
    $options = 'tcpflags,routefilter,nosmurfs,logmartians',
5
    $add_options = '',
6 7 8
    $dhcp = false,
    $order = 100
){
9 10 11
    $added_opts = $add_options ? {
        ''      => '',
        default => ",${add_options}",
12 13
    }

14 15 16 17 18
    $dhcp_opt = $dhcp ? {
        false   => '',
        default => ',dhcp',
    }

Micah Anderson's avatar
Micah Anderson committed
19
    shorewall::entry { "interfaces-${order}-${name}":
20
        line => "${zone} ${name} ${broadcast} ${options}${dhcp_opt}${added_opts}",
21 22 23
    }
}