summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2017-04-07 18:07:44 +0200
committermh <mh@immerda.ch>2017-04-07 18:07:44 +0200
commitd11b179b1b2f6083c0987e4650d89ad7831863e6 (patch)
tree8b40c75460f815b6d3565512f8bb6eefcf3b854e /manifests
parentcdb82d7bde4861434cea81d7f5770164f5fff76c (diff)
add mgmt of files for shorewall6
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp3
-rw-r--r--manifests/managed_file.pp19
2 files changed, 20 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 16d7170..eeab56f 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -124,6 +124,9 @@ class shorewall(
'mangle',
]:;
}
+ Shorewall::Managed_file['zones']{
+ shorewall6 => true,
+ }
create_resources('shorewall::zone',$zones,$zones_defaults)
create_resources('shorewall::interface',$interfaces,$interfaces_defaults)
diff --git a/manifests/managed_file.pp b/manifests/managed_file.pp
index b353814..b4941a7 100644
--- a/manifests/managed_file.pp
+++ b/manifests/managed_file.pp
@@ -1,8 +1,9 @@
# manage a certain file
-define shorewall::managed_file() {
+define shorewall::managed_file(
+ $shorewall6 = false,
+) {
concat{ "/etc/shorewall/puppet/${name}":
notify => Exec['shorewall_check'],
- require => File['/etc/shorewall/puppet'],
owner => 'root',
group => 'root',
mode => '0600';
@@ -17,4 +18,18 @@ define shorewall::managed_file() {
target => "/etc/shorewall/puppet/${name}",
order => '999';
}
+ if $shorewall6 and $shorewall::with_shorewall6 {
+ concat{ "/etc/shorewall6/puppet/${name}":
+ notify => Exec['shorewall6_check'],
+ owner => 'root',
+ group => 'root',
+ mode => '0600';
+ }
+ concat::fragment {
+ "${name}-header":
+ source => "puppet:///modules/shorewall/boilerplate6/${name}.header",
+ target => "/etc/shorewall6/puppet/${name}",
+ order => '000';
+ }
+ }
}