Apparently I had another mistype somewhere. Problem solved. On Friday, July 21, 2017 at 2:21:22 PM UTC-5, Ryan Murphy wrote: > > So my hiera variable looks like this. > > contacts: > 'Group A': > 'bmurphy': 'bobmur...@testsite.com' > 'cjames': 'chadja...@testsite.com' > 'Group B': > 'RPrice': 'rodpr...@testsite.com' > 'STurpen': 'stevetur...@testsite.com' > > > I need to be able to iterate through contacts, grab the group name create > a Nagios_contact group based on that value, then iterate through each group > and create the contacts. How do I do this? > > I tried something like below but it just doesn't work. > > $contactdata.each | $groupname, $groupcontacts | { > $contactgroupname = $groupname[0] > nagios_contactgroup { "$contactgroupname": > ensure => present, > } > $groupcontacts.each | String $username, String $emailaddress | { > nagios_contact { "$username": > ensure => present, > contactgroups => "$groupdisplay", > email => "$emailaddress", > } > } >
-- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/74b4be08-6979-406d-9945-695a51927efe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.