diff options
Diffstat (limited to 'manifests/register.pp')
-rw-r--r-- | manifests/register.pp | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/manifests/register.pp b/manifests/register.pp index 254eaaf..9257ca1 100644 --- a/manifests/register.pp +++ b/manifests/register.pp @@ -1,31 +1,16 @@ define munin::register ( - $host = 'absent', - $port = 'absent', + $host = $::fqdn, + $port = '4949', $description = 'absent', $config = [] ) { - $fhost = $name - $client_type = 'client' + $fhost = $name + $client_type = 'client' - $munin_port_real = $port ? { - 'absent' => hiera('munin_port','4949'), - default => $port - } - - $hiera_munin_host = hiera('munin_host','') - $munin_host_real = $host ? { - 'absent' => $hiera_munin_host ? { - '' => $::fqdn, - 'fqdn' => $::fqdn, - default => $hiera_munin_host - }, - default => $host - } - - @@concat::fragment{ "munin_client_${fhost}_${munin_port_real}": - target => '/etc/munin/munin.conf', - content => template("munin/client.erb"), - tag => 'munin', - } + @@concat::fragment{ "munin_client_${fhost}_${port}": + target => '/etc/munin/munin.conf', + content => template("munin/client.erb"), + tag => 'munin', + } } |