Nan Liu, this help me A LOT,
thank you so much! On Thursday, August 11, 2011 11:11:31 PM UTC-3, Nan Liu wrote: > > On Thu, Aug 11, 2011 at 7:19 PM, treydock <[email protected] <javascript:>> > wrote: > > Looking up the use of create_resources which is mentioned in the bug > > you linked, looks like it's available only in 2.7.x. I'm currently > > running 2.6.9, but may be worth upgrading for. > > Pretty sure you can be backport to 2.6 since it's just a function: > > https://github.com/puppetlabs/puppetlabs-create_resources > > > I tried you suggestion, but get this error... > > > > err: Could not retrieve catalog from remote server: Error 400 on > > SERVER: Invalid tag "dump_dir/backups/redmine- > > sqldumpsdatabasesredminebackup_dir/var/www/rails/redmine" at /etc/ > > puppet/modules/backuppc/manifests/definitions/sqldump.pp:11 on > > node ... > > Can't say for sure without more code, but this simple example should > demonstrate how this works: > > $myhash = { > var1 => { > message => 'hi' > }, > var2 => { > message => 'bye' > } > } > > define my_notify ($var) { > notify { $name: > message => $var[$name]['message'] > } > } > > my_notify { ['var1', 'var2']: > var => $myhash > } > > > Also I am not sure what you mean by "functions that get an array of > > first level hash keys". > > I mean if you need this to work with any hash without manually > providing an array of resource titles write a custom puppet function > that returns hash keys as a custom puppet function. > > Thanks, > > Nan > > -- 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/1d28b4c4-2d57-4309-86f5-659a8770cb29%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
