I've done the following, it ended up being a bit simpler for me when I'm
not sure what random services a new CentOS install has installed and/or

   define no_service ( ) {
     service { "${name}" :
       ensure => stopped ,
       enable => false ,
       status => "stat -t /etc/rc?.d/S??${name} > /dev/null 2>&1" ,

You can then declare individual service names, or lists of service names,
each of which will be disabled and shut down if the service is enabled. If
a particular service doesn't exist, the puppet agent does nothing.

   no_service { 'ip6tables' : }
   no_service { [ 'nfslock' , 'portmap' , 'xyzzy' ] : }

The only caveat is, if a service is disabled (i.e. "chkconfig service off")
but the service is still running, the puppet agent won't stop it. Of
course, if you have a service which is normally off and you've only enabled
it to test something, this could be a good thing...

You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppuppet-users @
postedMay 9, '13 at 9:28p
activeMay 9, '13 at 9:50p

2 users in discussion

Stefan Schulte: 1 post John Simpson: 1 post



site design / logo © 2022 Grokbase