Is it possible to require a user define? Something like: define a { type { "$name": } type { "xyy": } } type { "foo": require => A["bar"], } I have done this in a module without a syntax error, but I''m not sure it is working as expected. It could be my error elsewhere, but I wanted to check if this should work. What I would hope would happen is that "foo" becomes dependent on the expanded macro: [Type["bar"], Type ["xyz"] -Brad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Is it possible to require a user define? Something like: > > define a { > type { "$name": > } > type { "xyy": > } > } > > type { "foo": > require => A["bar"], > }this works. cheers pate --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Jun 16, 1:28 am, Peter Meier <peter.me...@immerda.ch> wrote:> > Is it possible to require a user define? Something like: > > > define a { > > type { "$name": > > } > > type { "xyy": > > } > > } > > > type { "foo": > > require => A["bar"], > > } > > this works. >Good to know thanks. Internally does puppet keep track of define instantiations buy name? I am wondering what happens in a situation like this: define b(param) { type { "$param": } } b { "abc": param => "p1", } b { "def": param => "p2", } type { "foo": require => B["def"], } What I would hope happens is that when b is instantiated with each name, puppet keeps track of the enclosed types so that "foo" depends on Type["p2"] in the example above. Also, does puppet have a way to print the resulting dependency graph for testing and debugging? -Brad --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---