1 |
class shorewall { |
class shorewall { |
2 |
include concat::setup |
include concat::setup |
3 |
|
|
|
$shorewalldir = "/etc/shorewall_test" |
|
|
|
|
4 |
define shorewallfile () { |
define shorewallfile () { |
5 |
$filename = "${shorewalldir}/${name}" |
$filename = "/tmp/shorewall/${name}" |
6 |
$header = "puppet:///modules/shorewall/headers/${name}" |
$header = "puppet:///modules/shorewall/headers/${name}" |
7 |
$footer = "puppet:///modules/shorewall/footers/${name}" |
$footer = "puppet:///modules/shorewall/footers/${name}" |
8 |
concat{$filename: |
concat{$filename: |
27 |
### Rules |
### Rules |
28 |
shorewallfile{ rules: } |
shorewallfile{ rules: } |
29 |
define rule_line($order = 50) { |
define rule_line($order = 50) { |
30 |
$filename = "${shorewalldir}/rules" |
$filename = "/tmp/shorewall/rules" |
31 |
$line = $name |
$line = $name |
32 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
33 |
target => $filename, |
target => $filename, |
54 |
### Zones |
### Zones |
55 |
shorewallfile{ zones: } |
shorewallfile{ zones: } |
56 |
define zone_line($order = 50) { |
define zone_line($order = 50) { |
57 |
$filename = "${shorewalldir}/zones" |
$filename = "/tmp/shorewall/zones" |
58 |
$line = $name |
$line = $name |
59 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
60 |
target => $filename, |
target => $filename, |
74 |
### Policy |
### Policy |
75 |
shorewallfile{ policy: } |
shorewallfile{ policy: } |
76 |
define policy_line($order = 50) { |
define policy_line($order = 50) { |
77 |
$filename = "${shorewalldir}/policy" |
$filename = "/tmp/shorewall/policy" |
78 |
$line = $name |
$line = $name |
79 |
concat::fragment{"newline_${name}": |
concat::fragment{"newline_${name}": |
80 |
target => $filename, |
target => $filename, |