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" }
- henrik
> --
> 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/-/5PkidQ_83E0J.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
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" }
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
}
}
Al - You should be able to create something based on create_resources
to do what you want. Its a similar concept.
ken.
> --
> 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/-/IRS5R_gfpk0J.