Ben Schofield
2012-Nov-28 16:43 UTC
[Puppet Users] anyway to "inherit" the argument list from a puppet define?
Is there anyway to "inherit" the argument list from a puppet define so
that
a wrapping define does not have to declare the same variables twice?
For example
define my_define($arg1, $arg2, $arg3){
...
}
define wrapper {
#modify arg2
...
#call my_define passing args 1-3
}
#Now call the wrapper and pass in args for my_define
wrapper{''example'': arg1 => 1,
arg2 => 2,
arg3 => 3}
--
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/-/d6--guFPI7gJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Henrik Lindberg
2012-Nov-28 17:23 UTC
Re: [Puppet Users] anyway to "inherit" the argument list from a puppet define?
On 2012-28-11 17:43, Ben Schofield wrote:> Is there anyway to "inherit" the argument list from a puppet define so > that a wrapping define does not have to declare the same variables twice? >No. Sorry.> For example > > define my_define($arg1, $arg2, $arg3){ > ... > } > > define wrapper { > #modify arg2 > ... > #call my_define passing args 1-3 > > } > > #Now call the wrapper and pass in args for my_define > wrapper{''example'': arg1 => 1, > arg2 => 2, > arg3 => 3} > > --- henrik -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.