]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
provide an easy option to still manage the source of the central conf file
authormh <mh@immerda.ch>
Wed, 2 Jan 2013 18:46:52 +0000 (19:46 +0100)
committermh <mh@immerda.ch>
Wed, 2 Jan 2013 18:48:56 +0000 (19:48 +0100)
README
manifests/base.pp
manifests/init.pp

diff --git a/README b/README
index 29fd84df4cf984655547c5fc6b81151a70921c14..f0b13cc2e5be8cf692110ff6a9e528cec80fa8b3 100644 (file)
--- a/README
+++ b/README
@@ -49,14 +49,11 @@ shorewall.conf, simply do this:
 
 NOTE: this requires the augeas ruby bindings newer than 0.7.3. 
 
-If you need to, you can provide an entire shorewall.conf by overriding the file
-resource, for example:
+If you need to, you can provide an entire shorewall.conf by passing its
+source to the main class:
 
-class site_shorewall::config inherits shorewall::base {
-
-    File["/etc/shorewall/shorewall.conf"] {
-      source => "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf.${::operatingsystem}",
-    }
+class{'shorewall':
+  conf_source => "puppet:///modules/site_shorewall/${::fqdn}/shorewall.conf.${::operatingsystem}",
 }
 
 NOTE: if you distribute a file, you cannot also use augeas, puppet and augeas
index 52e77d860d1af60ce1fdcddea5838f42edb76ec9..4324553d07cffd81b4e41647687bd035c39341da 100644 (file)
@@ -16,6 +16,12 @@ class shorewall::base {
         owner => root, group => 0, mode => 0644;
     }
 
+    if $shorewall::conf_source {
+      File['/etc/shorewall/shorewall.conf']{
+        source => $shorewall::conf_source,
+      }
+    }
+
     augeas { 'shorewall_module_config_path':
       changes => 'set /files/etc/shorewall/shorewall.conf/CONFIG_PATH \'"/etc/shorewall/puppet:/etc/shorewall:/usr/share/shorewall"\'',
       lens    => 'Shellvars.lns',
index 63e6fd380ad85c47c5ecaf93cbd2c79fc514fc6a..13eea894af914447a8cb373459290ab2d85a958a 100644 (file)
@@ -1,5 +1,6 @@
 class shorewall(
   $startup                    = '1',
+  $conf_source                = false,
   $ensure_version             = 'present',
   $tor_transparent_proxy_host = '127.0.0.1',
   $tor_transparent_proxy_port = '9040',