diff options
author | mh <mh@immerda.ch> | 2011-11-05 14:15:17 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-11-05 14:15:17 +0100 |
commit | 8f033c40a6ff210ce295db2bde025d739f8c3053 (patch) | |
tree | 09f7b9ea6b08f61922680323ba17547429be9610 /manifests | |
parent | d4a2a66e9b9641f84168f86db7fa10dd33326c12 (diff) | |
download | puppet-shorewall-8f033c40a6ff210ce295db2bde025d739f8c3053.tar.gz puppet-shorewall-8f033c40a6ff210ce295db2bde025d739f8c3053.tar.bz2 |
configure munin things via hiera, allow interface to be chosen
Diffstat (limited to 'manifests')
-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', |