Displaying 1 result from an estimated 1 matches for "hosts_allow_".
Did you mean:
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 ${collector}": }
add_snmp_hosts_allo...