On 13/01/14 23:00, jcbollinger wrote:
Puppet expects a comma-delimited string of contact group names (as will appear in the target config file) rather than an array. Upon receiving an array, it somehow chooses just one of its elements.

It seems your second suggestion was correct. The nagios_* types expect a comma-separated string, not an array. This is ridiculous and bizarre behaviour and seems to defy the whole point of having a managed resource, and there is an old, open bug for it.

http://projects.puppetlabs.com/issues/4020

There's a workaround using templates as a filthy hack:

# manifest.pp
nagios_host { "$fqdn":
  address => "$ipaddress",
  hostgroups => template("join_hostgroups.erb")
}


# join_host_groups.erb:
<%= nagios_hostgroups.join(',') %>


Thanks,
Jonathan

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/52D522BE.3040400%40bristol.ac.uk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to