diff options
author | Gabriel Filion <gabster@lelutin.ca> | 2014-12-13 11:21:09 -0500 |
---|---|---|
committer | Gabriel Filion <gabster@lelutin.ca> | 2014-12-13 11:21:09 -0500 |
commit | acfaa47dbdb07805cb07eb72f552d0e9b03ba1c9 (patch) | |
tree | 861622211d28234516e4324de12624ef812b8a9e /manifests/client.pp | |
parent | 48272434978f95c70e34aebe9ce188157f8f935e (diff) |
create a single entry point to the module
The current state of the module makes it impossible to install a munin
server with munin::host, since it depends on resources in munin::client
(because of the plugins it installs). Even if we include the
munin::client class "just before" munin::host, puppet thinks there are
dependency issues.
By moving arguments to a single point of entry we can then include all
necessary items and puppet will find the needed resources correctly.
Diffstat (limited to 'manifests/client.pp')
-rw-r--r-- | manifests/client.pp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index 724ff05..aca899a 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -3,18 +3,7 @@ # Adapted and improved by admin(at)immerda.ch # configure a munin node -class munin::client( - $allow = [ '127.0.0.1' ], - $host = '*', - $host_name = $::fqdn, - $port = '4949', - $use_ssh = false, - $manage_shorewall = false, - $shorewall_collector_source = 'net', - $export_tag = 'munin', - $description = 'absent', - $munin_group = 'absent', -) { +class munin::client { case $::operatingsystem { openbsd: { include munin::client::openbsd } @@ -24,11 +13,11 @@ class munin::client( centos: { include munin::client::base } default: { include munin::client::base } } - if $munin::client::manage_shorewall { + if $munin::manage_shorewall { class{'shorewall::rules::munin': - munin_port => $port, - munin_collector => delete($allow,'127.0.0.1'), - collector_source => $shorewall_collector_source, + munin_port => $munin::port, + munin_collector => delete($munin::allow,'127.0.0.1'), + collector_source => $munin::shorewall_collector_source, } } } |