diff options
-rw-r--r-- | manifests/rules/munin.pp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/manifests/rules/munin.pp b/manifests/rules/munin.pp index 0a026b0..17f0961 100644 --- a/manifests/rules/munin.pp +++ b/manifests/rules/munin.pp @@ -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', |