diff options
Diffstat (limited to 'manifests/client.pp')
-rw-r--r-- | manifests/client.pp | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index 273070d..2316bc9 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -3,24 +3,28 @@ # See LICENSE for the full license granted to you. # Adapted and improved by admin(at)immerda.ch -class munin::client inherits munin { - - $munin_port_real = $munin_port ? { '' => 4949, default => $munin_port } - $munin_host_real = $munin_host ? { - '' => '*', - 'fqdn' => '*', - default => $munin_host - } - - case $operatingsystem { - openbsd: { include munin::client::openbsd } - darwin: { include munin::client::darwin } - debian,ubuntu: { include munin::client::debian } - gentoo: { include munin::client::gentoo } - centos: { include munin::client::package } - default: { include munin::client::base } - } - if $use_shorewall { - include shorewall::rules::munin +class munin::client( + $allow = [ '127.0.0.1' ], + $host = '*', + $port = '4949', + $use_ssh = false, + $manage_shorewall = false, + $shorewall_collector_source = 'net', + $export_tag = 'munin' +) { + case $::operatingsystem { + openbsd: { include munin::client::openbsd } + darwin: { include munin::client::darwin } + debian,ubuntu: { include munin::client::debian } + gentoo: { include munin::client::gentoo } + centos: { include munin::client::package } + default: { include munin::client::base } + } + if $munin::client::manage_shorewall { + class{'shorewall::rules::munin': + munin_port => $port, + munin_collector => delete($allow,'127.0.0.1'), + collector_source => $shorewall_collector_source, } + } } |