diff options
author | mh <mh@immerda.ch> | 2012-06-05 19:39:49 -0300 |
---|---|---|
committer | mh <mh@immerda.ch> | 2012-06-05 19:39:49 -0300 |
commit | 9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 (patch) | |
tree | eea2a9e6b54b733b9a5d2bdfeca9679f1a27a86d /manifests/register | |
parent | e710a3bfd1d24a9fa4fdb217609635fec616a6f7 (diff) |
new style for 2.7
Diffstat (limited to 'manifests/register')
-rw-r--r-- | manifests/register/snmp.pp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/manifests/register/snmp.pp b/manifests/register/snmp.pp index acd1e03..3007b67 100644 --- a/manifests/register/snmp.pp +++ b/manifests/register/snmp.pp @@ -2,26 +2,25 @@ define munin::register::snmp ( $community = 'public', $description = 'absent', $port = 'absent' -) -{ - $fhost = $name - $munin_host_real = $::fqdn - $client_type = 'snmp' - $config = [ 'use_node_name no' ] +) { + $fhost = $name + $munin_host_real = $::fqdn + $client_type = 'snmp' + $config = [ 'use_node_name no' ] - $munin_port_real = $port ? { - 'absent' => hiera('munin_port','4949'), - default => $port - } + $munin_port_real = $port ? { + 'absent' => hiera('munin_port','4949'), + default => $port + } - exec { "munin_register_snmp_${fhost}": - command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --shell | sh", - unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null", - } + exec { "munin_register_snmp_${fhost}": + command => "munin-node-configure --snmp ${fhost} --snmpcommunity ${community} --shell | sh", + unless => "ls /etc/munin/plugins/snmp_${fhost}_* &> /dev/null", + } - @@concat::fragment{ "munin_snmp_${fhost}": - target => '/etc/munin/munin.conf', - content => template("munin/client.erb"), - tag => 'munin', - } + @@concat::fragment{ "munin_snmp_${fhost}": + target => '/etc/munin/munin.conf', + content => template("munin/client.erb"), + tag => 'munin', + } } |