Andrew Thompson
2011-Jul-13 00:32 UTC
[Puppet Users] Perform puppetrun on a subset of the included classes
Does puppet have/support the use case where I only want to include certain classes if the puppet daemon is running, and another set if classes if puppet is run manually with the runonce option? I think a good example would be: * I want to include nagios and nrpe when run via the daemon * I want to include mysql (to manage the mysql service, package, users, grants, etc.) when when manually with the runonce option The idea is I may have some set of applications that "can" be updated at anytime, but there will other applications that are under strict change control. -Andrew -- 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.
Ken Barber
2011-Jul-13 01:51 UTC
Re: [Puppet Users] Perform puppetrun on a subset of the included classes
Have you looked at tags? http://docs.puppetlabs.com/references/stable/metaparameter.html#tag http://docs.puppetlabs.com/references/stable/function.html#tag It allows you to tag parts of your content, and selectively run it with --tags <tag_name> on the command line. Classes are already tagged implicitly with their own name - so this will already work for you most probably. ken. On Wed, Jul 13, 2011 at 1:32 AM, Andrew Thompson <netengr2009@gmail.com> wrote:> Does puppet have/support the use case where I only want to include > certain classes if the puppet daemon is running, and another set if > classes if puppet is run manually with the runonce option? > > I think a good example would be: > * I want to include nagios and nrpe when run via the daemon > * I want to include mysql (to manage the mysql service, package, > users, grants, etc.) when when manually with the runonce option > > The idea is I may have some set of applications that "can" be updated > at anytime, but there will other applications that are under strict > change control. > > -Andrew > > -- > 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. > >-- "Join us for PuppetConf, September 22nd and 23rd in Portland, OR: http://bit.ly/puppetconfsig" -- 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 am having a weird problem on a new (rhel6) puppet server. I can not seem to be able to define custom variable. Neither template nor class is able to use this variable. Puppet version: 2.7.9 server: RHEL 6.1 here is snippet of what I am doing: node ''something'' inherits env_prod { $mode = "PROD" } then I use the following in a class: class hosts { file {"hosts": path => "/etc/hosts", owner => "root", group => "root", mode => 644, content => template("env/${environment}/${mode}/etc/hosts.erb"), } } what is weird is that this use to work perfectly when I did it on RHEL5.5 with puppet 2.6. any ideas what I am doing wrong? Thank you very much -- 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.
Please do not hijack existing threads. Create a new thread for a new question. John -- 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.