On Thursday, October 27, 2011 4:03:42 PM UTC+1, Henrik Lindberg wrote: > > Did you try something like: > > define boo($a="a", $b="b", $c="c") { > bar { $title: > a => $a, > b => $b, > c => $c, > } > } > > boo { 'the title' : a => "a value", c => "c value" } > Thanks for reply, Henrik What you've written works, but doesn't fit my case. Taken your examples I don't want (can't) pre-define boo arguments. I would have something like: define boo($options) {
bar { $title: a => $a, # this argument dynamically created according to $options (which is supposed to be an hash) b => $b, # as above c => $c, # as above } } I would use boo in this way: boo { "title": options { a => aa, b => bb, c => dfs, }, } ... (am I asking too much ? :-) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/8ROd9Z11z2cJ. 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.