All, Does anyone know if there is any adverse side effect to including a class multiple times in different places? I.e. class foo { ... } class bar { include "foo" } node bob { include "foo" include "bar" } There doesn''t *seem* to be any problem, but I''d like to make sure I''m not exploiting something that may change. It seems to me that a duplicate include should just be ignored.... Thanks, Trevor --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi> Does anyone know if there is any adverse side effect to including a > class multiple times in different places? > > I.e. > > class foo { ... } > > class bar { include "foo" } > > node bob { > include "foo" > include "bar" > } > > There doesn''t *seem* to be any problem, but I''d like to make sure I''m > not exploiting something that may change. > > It seems to me that a duplicate include should just be ignored....from: http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial "Classes are evaluated using the include function. If a class is already evaluated, then include essentially does nothing." so nothing bad and this is imho exactly what include is for: ensure that a class is evaluated if it haven''t been yet. greets pete --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Trevor Vaughan
2008-Sep-10 13:24 UTC
[Puppet Users] Re: Question about redundant includes.
Pete, That''s what I thought, I was just a little nervous about the ''essentially'' language. I''ll assume the best and move along! Thanks, Trevor On Wed, Sep 10, 2008 at 9:10 AM, Peter Meier <peter.meier@immerda.ch> wrote:> > Hi > >> Does anyone know if there is any adverse side effect to including a >> class multiple times in different places? >> >> I.e. >> >> class foo { ... } >> >> class bar { include "foo" } >> >> node bob { >> include "foo" >> include "bar" >> } >> >> There doesn''t *seem* to be any problem, but I''d like to make sure I''m >> not exploiting something that may change. >> >> It seems to me that a duplicate include should just be ignored.... > > > from: http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial > > "Classes are evaluated using the include function. If a class is already > evaluated, then include essentially does nothing." > > so nothing bad and this is imho exactly what include is for: ensure that > a class is evaluated if it haven''t been yet. > > greets pete > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---