On Mon, Jul 30, 2012 at 08:28:34AM -0700, lth wrote: > I have two modules both of which require a 3rd module. The problem of > course is that if I use both modules on a node, I end up with a "Duplicate > declaration" error of the third module. > What's the right way to handle two modules that both require a 3rd one?
Use include. http://docs.puppetlabs.com/references/stable/function.html#include Modules have this: class module1::thing { include module3 } class module2::other { include module3 } Node has this: node hostname { class { 'module1::thing': } class { 'module2::other': } } Then the module3 class is only evaluated once. Remember dependencies if you need module3 evalated before other stuff. > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > [1]https://groups.google.com/d/msg/puppet-users/-/jwUX9RrpZB4J. > 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. > > References > > Visible links > 1. https://groups.google.com/d/msg/puppet-users/-/jwUX9RrpZB4J -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.