Team, Is there any way where we can exclude certain module from the inherited list Thanks, Munna -- 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.
Munna S
2012-May-02 16:00 UTC
[Puppet Users] Re: how to exclude modules from inherited list
Team, Any help? Thanks, Jeeva On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com> wrote:> Team, > > Is there any way where we can exclude certain module from the inherited > list > > Thanks, > Munna >-- 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.
Luke Bigum
2012-May-02 16:13 UTC
Re: [Puppet Users] Re: how to exclude modules from inherited list
Hi, I don''t understand what you mean by "inherit list". Module inheritance is like this: class woof inherits meow { ... } ... and there''s no list, it''s a single class. Are you talking about pluginsync and defined modules on a Puppet Master? Can you describe your problem in another way or rephrase what you''re trying to achieve? -Luke On 02/05/12 17:00, Munna S wrote:> Team, > Any help? > Thanks, > Jeeva > > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com > <mailto:19.munna@gmail.com>> wrote: > > Team, > Is there any way where we can exclude certain module from the > inherited list > Thanks, > Munna > > > -- > 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.-- Luke Bigum Information Systems Ph: +44 (0) 20 3192 2520 luke.bigum@lmax.com | http://www.lmax.com LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN FX and CFDs are leveraged products that can result in losses exceeding your deposit. They are not suitable for everyone so please ensure you fully understand the risks involved. The information in this email is not directed at residents of the United States of America or any other jurisdiction where trading in CFDs and/or FX is restricted or prohibited by local laws or regulations. The information in this email and any attachment is confidential and is intended only for the named recipient(s). The email may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not the intended recipient please notify the sender immediately and delete any copies of this message. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. LMAX operates a multilateral trading facility. Authorised and regulated by the Financial Services Authority (firm registration number 509778) and is registered in England and Wales (number 06505809). Our registered address is Yellow Building, 1A Nicholas Road, London, W11 4AN. -- 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.
Dan White
2012-May-02 16:33 UTC
Re: [Puppet Users] Re: how to exclude modules from inherited list
----- Munna S <19.munna@gmail.com> wrote:> Team, > > Any help? > > Thanks, > Jeeva > > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com> wrote: > > > Team, > > > > Is there any way where we can exclude certain module from the inherited > > list > > > > Thanks, > > Munna > >http://www.catb.org/~esr/faqs/smart-questions.html Two comments: I think you are a bit impatient, and I think there is insufficient detail/info to formulate an answer. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- 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.
Munna S
2012-May-07 15:39 UTC
Re: [Puppet Users] Re: how to exclude modules from inherited list
Hi Team, sorry for the delay. My setup is like this. we have a 2 .pp file. one for production ( prod_base.pp) and other for development ( dev_base.pp) under /etc/puppet/manifests/nodes . we have included the respective module in these 2 .pp files. for eg: prod_base.pp has the below content --------------------------------------------------- node prod_base { # Prod Module include prod_scripts include prod_disabled_services include prod_apache } -------------------------------------------------- now we also have a different .pp file for individual servers under /etc/puppet/manifests/nodes by name servername.pp. for eg: server1.pp, server2.pp etc.. content of the server1.pp file is as below ------------------------------------------------- node server1 inherits prod_base { } ------------------------------------------------- now server1 inherits all the module which is mentioned in prod_base.pp. now my requirements is to exclude some of the modules from prod_base.pp for server server1.pp. How i can exclude certain module from the inherited list? Thanks, Jeeva On Wed, May 2, 2012 at 11:33 AM, Dan White <ygor@comcast.net> wrote:> ----- Munna S <19.munna@gmail.com> wrote: > > Team, > > > > Any help? > > > > Thanks, > > Jeeva > > > > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com> wrote: > > > > > Team, > > > > > > Is there any way where we can exclude certain module from the inherited > > > list > > > > > > Thanks, > > > Munna > > > > > http://www.catb.org/~esr/faqs/smart-questions.html > > Two comments: I think you are a bit impatient, and I think there is > insufficient detail/info to formulate an answer. > > “Sometimes I think the surest sign that intelligent life exists elsewhere > in the universe is that none of it has tried to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > 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. > >-- 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.
Munna S
2012-May-08 12:09 UTC
Re: [Puppet Users] Re: how to exclude modules from inherited list
Team, can someone help me Thanks, Jeeva On Mon, May 7, 2012 at 10:39 AM, Munna S <19.munna@gmail.com> wrote:> Hi Team, > > sorry for the delay. My setup is like this. > > we have a 2 .pp file. one for production ( prod_base.pp) and other for > development ( dev_base.pp) under /etc/puppet/manifests/nodes . we have > included the respective module in these 2 .pp files. for eg: > > prod_base.pp has the below content > --------------------------------------------------- > node prod_base { > # Prod Module > include prod_scripts > include prod_disabled_services > include prod_apache > } > -------------------------------------------------- > now we also have a different .pp file for individual servers under > /etc/puppet/manifests/nodes by name servername.pp. for eg: > > server1.pp, server2.pp etc.. content of the server1.pp file is as below > > ------------------------------------------------- > node server1 inherits prod_base { > } > ------------------------------------------------- > > > now server1 inherits all the module which is mentioned in prod_base.pp. > > now my requirements is to exclude some of the modules from prod_base.pp > for server server1.pp. How i can exclude certain module from the inherited > list? > > Thanks, > Jeeva > > > > > > > On Wed, May 2, 2012 at 11:33 AM, Dan White <ygor@comcast.net> wrote: > >> ----- Munna S <19.munna@gmail.com> wrote: >> > Team, >> > >> > Any help? >> > >> > Thanks, >> > Jeeva >> > >> > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com> wrote: >> > >> > > Team, >> > > >> > > Is there any way where we can exclude certain module from the >> inherited >> > > list >> > > >> > > Thanks, >> > > Munna >> > > >> >> http://www.catb.org/~esr/faqs/smart-questions.html >> >> Two comments: I think you are a bit impatient, and I think there is >> insufficient detail/info to formulate an answer. >> >> “Sometimes I think the surest sign that intelligent life exists elsewhere >> in the universe is that none of it has tried to contact us.” >> Bill Waterson (Calvin & Hobbes) >> >> -- >> 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. >> >> >-- 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.
Luke Bigum
2012-May-08 12:20 UTC
Re: [Puppet Users] Re: how to exclude modules from inherited list
Hi, No, that is impossible to do. Once a class is declared it cannot be undeclared. Puppet is an additive model. The way that node inheritance works means you can *NOT* even do this: class prod_scripts { if ($actually_do_prod_scripts) { ... ... } } node prod_base { include prod_scripts } node server1 inherits prod_base { $actually_do_prod_scripts = 1 } ... because $actually_do_prod_scripts is not defined when your prod_base node declares your prod_scripts class. Sorry to be the one to tell you, but when other people have asked about what you are asking the reply is usually to redesign what you''re trying to do ;-) Two ways forward: Set all your variables in your nodes first, then at the last possible moment you start to instantiate classes, this gets around the inheritance model. Redesign your modules and classes to be additive. If some nodes don''t need ''base_scripts'' then it''s not really appropriate in node ''prod_base''. Hope that helps, -Luke On 08/05/12 13:09, Munna S wrote:> Team, > can someone help me > Thanks, > Jeeva > > On Mon, May 7, 2012 at 10:39 AM, Munna S <19.munna@gmail.com > <mailto:19.munna@gmail.com>> wrote: > > Hi Team, > sorry for the delay. My setup is like this. > we have a 2 .pp file. one for production ( prod_base.pp) and > other for development ( dev_base.pp) under > /etc/puppet/manifests/nodes . we have included the respective > module in these 2 .pp files. for eg: > prod_base.pp has the below content > --------------------------------------------------- > node prod_base { > # Prod Module > include prod_scripts > include prod_disabled_services > include prod_apache > } > -------------------------------------------------- > now we also have a different .pp file for individual servers under > /etc/puppet/manifests/nodes by name servername.pp. for eg: > server1.pp, server2.pp etc.. content of the server1.pp file is as > below > ------------------------------------------------- > node server1 inherits prod_base { > } > ------------------------------------------------- > now server1 inherits all the module which is mentioned in > prod_base.pp. > now my requirements is to exclude some of the modules from > prod_base.pp for server server1.pp. How i can exclude certain > module from the inherited list? > Thanks, > Jeeva > > > On Wed, May 2, 2012 at 11:33 AM, Dan White <ygor@comcast.net > <mailto:ygor@comcast.net>> wrote: > > ----- Munna S <19.munna@gmail.com <mailto:19.munna@gmail.com>> > wrote: > > Team, > > > > Any help? > > > > Thanks, > > Jeeva > > > > On Wed, May 2, 2012 at 9:24 AM, Munna S <19.munna@gmail.com > <mailto:19.munna@gmail.com>> wrote: > > > > > Team, > > > > > > Is there any way where we can exclude certain module from > the inherited > > > list > > > > > > Thanks, > > > Munna > > > > > http://www.catb.org/~esr/faqs/smart-questions.html > <http://www.catb.org/%7Eesr/faqs/smart-questions.html> > > Two comments: I think you are a bit impatient, and I think > there is insufficient detail/info to formulate an answer. > > “Sometimes I think the surest sign that intelligent life > exists elsewhere in the universe is that none of it has tried > to contact us.” > Bill Waterson (Calvin & Hobbes) > > -- > 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 > <mailto:puppet-users@googlegroups.com>. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com > <mailto:puppet-users%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > > > -- > 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.-- Luke Bigum Information Systems Ph: +44 (0) 20 3192 2520 luke.bigum@lmax.com | http://www.lmax.com LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN FX and CFDs are leveraged products that can result in losses exceeding your deposit. They are not suitable for everyone so please ensure you fully understand the risks involved. The information in this email is not directed at residents of the United States of America or any other jurisdiction where trading in CFDs and/or FX is restricted or prohibited by local laws or regulations. The information in this email and any attachment is confidential and is intended only for the named recipient(s). The email may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not the intended recipient please notify the sender immediately and delete any copies of this message. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. LMAX operates a multilateral trading facility. Authorised and regulated by the Financial Services Authority (firm registration number 509778) and is registered in England and Wales (number 06505809). Our registered address is Yellow Building, 1A Nicholas Road, London, W11 4AN. -- 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.