search for: add_snmp_hosts_allow

Displaying 1 result from an estimated 1 matches for "add_snmp_hosts_allow".

2012 Jul 08
3
create multiple resources from an array of things.
Hi gang, I feel like I''m missing something fundamental here… I''ve got the following: class snmp::rhel::rh5enable { $collector = [''10.0.0.1'', ''10.0.0.2''] define add_snmp_hosts_allow ($ip) { exec { "hosts_allow_$ip": command => "/bin/echo \"snmpd : $ip : ALLOW\" >>/etc/hosts.allow", unless => "/bin/grep -c \"snmpd : $ip : ALLOW\" /etc/hosts.allow", } } notify { "COLLECTOR IS SET TO ${col...