]> gitweb.fluxo.info Git - puppet-shorewall.git/commitdiff
configure munin things via hiera, allow interface to be chosen
authormh <mh@immerda.ch>
Sat, 5 Nov 2011 13:15:17 +0000 (14:15 +0100)
committermh <mh@immerda.ch>
Sat, 5 Nov 2011 13:15:17 +0000 (14:15 +0100)
manifests/rules/munin.pp

index 0a026b0d966ab916d91e69d6e82f6726b4c3e2cf..17f09619477dce6c319189573d2d72e2ec4266f8 100644 (file)
@@ -1,8 +1,12 @@
-class shorewall::rules::munin {
-    shorewall::params { 'MUNINPORT': value => $munin_port ? { '' => 4949, default => $munin_port } }
-    shorewall::params { 'MUNINCOLLECTOR': value => $munin_collector ? { '' => '127.0.0.1', default => $munin_collector } }
+class shorewall::rules::munin(
+  $munin_port = hiera('munin_port','4949'),
+  $munin_collector = hiera('munin_collector','127.0.0.1'),
+  $collector_interface_source = hiera('munin_collector_interface_source','net')
+){
+    shorewall::params { 'MUNINPORT': value => $munin_port }
+    shorewall::params { 'MUNINCOLLECTOR': value => $munin_collector }
     shorewall::rule{'net-me-munin-tcp':
-        source          => 'net:$MUNINCOLLECTOR',
+        source          => "${collector_interface_source}:\$MUNINCOLLECTOR",
         destination     => '$FW',
         proto           => 'tcp',
         destinationport => '$MUNINPORT',