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_allow{$collector: ip=> $collector,} } yet I get borked, as : err: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Exec[hosts_allow_10..0.0.110.0.0.2] is already declared in file /etc/puppetlabs/puppet/modules/core/snmp/manifests/rhel/rh5enable.pp at line 4; cannot redeclare at /etc/puppetlabs/puppet/modules/core/snmp/manifests/rhel/rh5enable.pp:4 on node centos how do I go about doing this "correctly" ? ________________________________ This message may contain confidential or privileged information. If you are not the intended recipient, please advise us immediately and delete this message. See http://www.datapipe.com/legal/email_disclaimer/ for further information on confidentiality and the risks of non-secure electronic communication. If you cannot access these links, please notify us by reply message and we will send the contents to you. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.