Say I have two classes: package::stable -- installs a specific version of a pkg package::devel -- installs the latest version in the repo The class package::stable would be specific for 90% of my machines in my environment, but on occasion we have to override the package version we want to install to grab the latest version. Is there a way to "disable" the package::stable class if say package::devel is assigned to a node? -Chris -- 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.
Christopher Johnston <chjohnst@gmail.com> writes:> Say I have two classes:> package::stable -- installs a specific version of a pkg > package::devel -- installs the latest version in the repo> The class package::stable would be specific for 90% of my machines in my > environment, but on occasion we have to override the package version we want > to install to grab the latest version. Is there a way to "disable" the > package::stable class if say package::devel is assigned to a node?I may be misunderstanding, but it sounds like package::devel should be inheriting from package::stable and overriding the ensure type (to latest instead of present). If you do that, you don''t need to disable package::stable. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> -- 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.
I figured it out I think by inheriting package::stable and then using the Package resource (note cap P) to override it. Thx! On Mon, May 3, 2010 at 7:04 PM, Russ Allbery <rra@stanford.edu> wrote:> Christopher Johnston <chjohnst@gmail.com> writes: > > > Say I have two classes: > > > package::stable -- installs a specific version of a pkg > > package::devel -- installs the latest version in the repo > > > The class package::stable would be specific for 90% of my machines in my > > environment, but on occasion we have to override the package version we > want > > to install to grab the latest version. Is there a way to "disable" the > > package::stable class if say package::devel is assigned to a node? > > I may be misunderstanding, but it sounds like package::devel should be > inheriting from package::stable and overriding the ensure type (to latest > instead of present). If you do that, you don''t need to disable > package::stable. > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> > > -- > 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<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.
On Mon, May 3, 2010 at 4:05 PM, Christopher Johnston <chjohnst@gmail.com> wrote:> > I figured it out I think by inheriting package::stable and then using the Package resource (note cap P) to override it. > Thx! > > On Mon, May 3, 2010 at 7:04 PM, Russ Allbery <rra@stanford.edu> wrote: >> >> Christopher Johnston <chjohnst@gmail.com> writes: >> >> > Say I have two classes: >> >> > package::stable -- installs a specific version of a pkg >> > package::devel -- installs the latest version in the repo >> >> > The class package::stable would be specific for 90% of my machines in my >> > environment, but on occasion we have to override the package version we want >> > to install to grab the latest version. Is there a way to "disable" the >> > package::stable class if say package::devel is assigned to a node? >> >> I may be misunderstanding, but it sounds like package::devel should be >> inheriting from package::stable and overriding the ensure type (to latest >> instead of present). If you do that, you don''t need to disable >> package::stable. >> >>Hi - I think you''ll have better luck using separate environments: http://projects.puppetlabs.com/projects/puppet/wiki/Using_Multiple_Environments I do this with several different environemnts, including dev, drunk, test, qa, prod, developer etc etc. [qa] manifest = /usr/share/puppet/qa/site.pp modulepath = /usr/share/puppet/qa/modules:/usr/share/puppet/trunk/modules This way, if the "stable" module is not found in qa (the one that I''m trying to QA), it defaults to using the module in trunk (my 90%-machines). When the module passes QA, I merge it to trunk and call it good. This way I don''t have to go back and clean up. Thanks -dant -- 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.