From 9fd1de5acd9064a0d67ca9d2c13a829a3f628f39 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 19:39:49 -0300 Subject: new style for 2.7 --- manifests/register/snmp.pp | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'manifests/register') 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', + } } -- cgit v1.2.3