1 |
class shorewall { |
class shorewall { |
2 |
include concat::setup |
include concat::setup |
3 |
|
|
4 |
|
$shorewalldir = "/tmp/shorewall" |
5 |
|
|
6 |
define shorewallfile () { |
define shorewallfile () { |
7 |
$filename = "/tmp/shorewall/${name}" |
$filename = "${shorewalldir}/${name}" |
8 |
$header = "puppet:///modules/shorewall/headers/${name}" |
$header = "puppet:///modules/shorewall/headers/${name}" |
9 |
$footer = "puppet:///modules/shorewall/footers/${name}" |
$footer = "puppet:///modules/shorewall/footers/${name}" |
10 |
concat{$filename: |
concat{$filename: |
29 |
### Rules |
### Rules |
30 |
shorewallfile{ rules: } |
shorewallfile{ rules: } |
31 |
define rule_line($order = 50) { |
define rule_line($order = 50) { |
32 |
$filename = "/tmp/shorewall/rules" |
$filename = "${shorewalldir}/rules" |
33 |
$line = "${name}\n" |
$line = "${name}\n" |
34 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
35 |
target => $filename, |
target => $filename, |
56 |
### Zones |
### Zones |
57 |
shorewallfile{ zones: } |
shorewallfile{ zones: } |
58 |
define zone_line($order = 50) { |
define zone_line($order = 50) { |
59 |
$filename = "/tmp/shorewall/zones" |
$filename = "${shorewalldir}/zones" |
60 |
$line = "${name}\n" |
$line = "${name}\n" |
61 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
62 |
target => $filename, |
target => $filename, |
76 |
### Policy |
### Policy |
77 |
shorewallfile{ policy: } |
shorewallfile{ policy: } |
78 |
define policy_line($order = 50) { |
define policy_line($order = 50) { |
79 |
$filename = "/tmp/shorewall/policy" |
$filename = "${shorewalldir}/policy" |
80 |
$line = "${name}\n" |
$line = "${name}\n" |
81 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
82 |
target => $filename, |
target => $filename, |