38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'manifests/ipset.pp', line 38
define ferm::ipset (
Hash[String[1], Ferm::Actions] $sets,
String[1] $chain = $name,
Ferm::Tables $table = 'filter',
Enum['ip','ip6'] $ip_version = 'ip',
Boolean $prepend_to_chain = true,
) {
$suffix = $prepend_to_chain ? {
true => 'aaa',
false => 'ccc',
}
# make sure the generated snippet is actually included
concat::fragment { "${table}-${chain}-${name}":
target => $ferm::configfile,
content => epp(
"${module_name}/ferm-chain-ipset.epp", {
'ip' => $ip_version,
'table' => $table,
'chain' => $chain,
'sets' => $sets,
}
),
order => "${table}-${chain}-${suffix}",
}
}
|