I accomplished something similar awhile back. While I've not spent much time looking at your particular problem, I think this'll help point you in the direction of what you need…
class mymodule::params{ $collector = hiera('mymodule_collector','') } class mymodule::config{ $collector = $mymodule::params::collector $ipstring = inline_template("<% collector.each_pair do |key, hash| %><%=hash['ip']%>,<%end%>") $ips = split ($ipstring,',') } define mymodule::add_hosts_allow () { exec { "hosts_allow_$title": command => "/bin/echo \"myservice : $title : ALLOW\" >>/etc/hosts.allow", unless => "/bin/grep -c \"myservice : $title : ALLOW\" /etc/hosts.allow", } #end exec } On Aug 21, 2012, at 11:00 PM, Douglas Garstang <doug.garst...@gmail.com> wrote: > I know I did this once before but can't find docs on how to do it again. > > I have this in a yaml file: > > pvdisks: > ec2_pvdisks_m1.small: > disks: /dev/xvdb1 > enabled: yes > > Loading it with hiera. > > Manifest has: > > $testkey = hiera('pvdisks') > notice ("TESTKEY=$testkey[ec2_pvdisks_m1.small]") > > This is printing > TESTKEY=ec2_pvdisks_m1.smalldisks/dev/xvdb1enabledtrue['ec2_pvdisks_m1.small'] > > which obviously is the data picked into a string. > > Doug. > > -- > 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. > ________________________________ 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.