diff options
author | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
---|---|---|
committer | micah <micah@muck.riseup.net> | 2013-03-20 18:25:28 -0400 |
commit | c9748747c5c755443d80445a9a6c3f5d2ab3bc7f (patch) | |
tree | 65887003b9bceefd7a6ba3e3692b9a6f08373304 /manifests/register.pp | |
parent | 149a78e7a8465da97f8ea267cd6a75e3bcdefe4d (diff) | |
parent | f79f662bedbbd75c7e2022da282ba48c1b323e90 (diff) |
Merge branch 'immerda/master'
Conflicts:
files/plugins/xen-cpu
templates/munin-node.conf.Debian.squeeze
Diffstat (limited to 'manifests/register.pp')
-rw-r--r-- | manifests/register.pp | 40 |
1 files changed, 12 insertions, 28 deletions
diff --git a/manifests/register.pp b/manifests/register.pp index 21f1d35..309c322 100644 --- a/manifests/register.pp +++ b/manifests/register.pp @@ -1,34 +1,18 @@ define munin::register ( - $host = 'absent', - $port = 'absent', + $host = $::fqdn, + $port = '4949', + $use_ssh = false, $description = 'absent', - $config = [] + $config = [], + $export_tag = 'munin' ) { - $fhost = $name - $client_type = 'client' + $fhost = $name + $client_type = 'client' - $munin_port_real = $port ? { - 'absent' => $munin_port ? { - '' => 4949, - default => $munin_port - }, - default => $port - } - - $munin_host_real = $host ? { - 'absent' => $munin_host ? { - '' => $fqdn, - 'fqdn' => $fqdn, - default => $munin_host - }, - default => $host - } - - @@file { "munin_client_${fhost}_${munin_port_real}": - ensure => present, - path => "/var/lib/puppet/modules/munin/nodes/${fhost}_${munin_port_real}", - content => template("munin/client.erb"), - tag => 'munin', - } + @@concat::fragment{ "munin_client_${fhost}_${port}": + target => '/etc/munin/munin.conf', + content => template("munin/client.erb"), + tag => $export_tag, + } } |