Is it possible to use a Service resource, but not have puppet start or start the service? I want to declare service resources so that I can easily make sure that puppet will restart them when packages are upgraded, etc., but I do not want puppet to restart them if a sysadmin shuts the down for some reason. -- 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.
Use the audit meta-parameter. Set it to enable and ensure, or all. service { "foo": audit => [''ensure'',''enable'']; } http://www.puppetlabs.com/blog/all-about-auditing-with-puppet/ On Nov 5, 2010, at 3:20 PM, byron appelt wrote:> Is it possible to use a Service resource, but not have puppet start or > start the service? I want to declare service resources so that I can > easily make sure that puppet will restart them when packages are > upgraded, etc., but I do not want puppet to restart them if a sysadmin > shuts the down for some reason. > > -- > 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.
On Fri, Nov 5, 2010 at 1:20 PM, byron appelt <byron.appelt@gmail.com> wrote:> Is it possible to use a Service resource, but not have puppet start or > start the service? I want to declare service resources so that I can > easily make sure that puppet will restart them when packages are > upgraded, etc., but I do not want puppet to restart them if a sysadmin > shuts the down for some reason.Instead of manually stopping a service, the resource should specify enable => false and ensure => stopped. To my knowledge there isn''t a no-op value for these parameters. Richard -- 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 Nov 5, 2010, at 4:20 PM, byron appelt wrote:> Is it possible to use a Service resource, but not have puppet start or > start the service? I want to declare service resources so that I can > easily make sure that puppet will restart them when packages are > upgraded, etc., but I do not want puppet to restart them if a sysadmin > shuts the down for some reason.Almost every service I have defined is set to start when the system boots, but Puppet won''t start it if it''s not running. Just leave the “ensure” parameter out entirely. service { "foo": enable => true, } And then you can either use “subscribe” on the service or “notify” on the packages, config files, etc. (Although I have to think most properly made packages will restart the service for you if needed.) -- Rob McBroom <http://www.skurfer.com/> -- 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 Nov 9, 2010, at 6:06 AM, Rob McBroom wrote:> On Nov 5, 2010, at 4:20 PM, byron appelt wrote: > >> Is it possible to use a Service resource, but not have puppet start or >> start the service? I want to declare service resources so that I can >> easily make sure that puppet will restart them when packages are >> upgraded, etc., but I do not want puppet to restart them if a sysadmin >> shuts the down for some reason. > > Almost every service I have defined is set to start when the system boots, but Puppet won''t start it if it''s not running. Just leave the “ensure” parameter out entirely. > > service { "foo": > enable => true, > } > > And then you can either use “subscribe” on the service or “notify” on the packages, config files, etc. (Although I have to think most properly made packages will restart the service for you if needed.)Just a warning: This will start the service if a config file is changed even if the service was manually shutdown. -- 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.