Thank you very much.
In fact it is the "restart => true" that disables the stop and start
mechanism.

Stéphan

On Mar 23, 12:19 pm, James Turnbull <ja...@lovedthanlost.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
> Stéphan Gorget wrote:
> > Hey,
>
> > I am managing ntpd with puppet (CentOS 5.2, puppet 0.24.7), and I
> > would like that ntpd restart when the config file changes. But to make
> > ntpd restart and take into account the new config file I had to
> > specify the "restart" parameter in the service section. (restart => "/
> > sbin/service ntpd restart").
> > I thought I should not have to specify the restart parameter as the
> > refresh with the tool service is managed by puppet, isn't it ?
>
> > The log output :
>
> > Mar 23 11:08:17 cors003 puppetd[1863]: (//Node[default]/ntp/File
> > [ntp.conf]/source) replacing from source puppet:///files/ntp/ntp.conf
> > with contents
> >                  {md5}ceec5c7a66a48d64d234adf01e282338
> > Mar 23 11:08:17 cors003 puppetd[1863]: (//Node[default]/ntp/Service
> > [ntpd]) Triggering 'refresh' from 1 dependencies
>
> > but NTPd is not restarting, my config file is this one :
>
> > class ntp {
> >         file { "ntp.conf":
> >                 name => "/etc/ntp.conf",
> >                 mode => 644,
> >                 owner => "root",
> >                 group => "root",
> >                 backup => false,
> >                 links => follow,
> >                 source => "puppet:///files/ntp/ntp.conf"
> >         }
>
> >         package { "ntp": ensure => installed }
>
> >         service { "ntpd":
> >                 subscribe => File["ntp.conf"],
> >                 require => File["ntp.conf"],
> >                 restart => true,
> >                 ensure => running,
> >         }
> > }
>
> Read thehttp://reductivelabs.com/trac/puppet/wiki/TypeReference#service
>
> You've misunderstood the options.  Have a look at the restart attribute
> (which should be the command used to restart) and hasrestart which
> specifies whether the service supports restarting or not.
>
> hasrestart => true,
>
> Regards
>
> James Turnbull
>
> - --
> Author of:
> * Pulling Strings with Puppet
> (http://www.amazon.com/gp/product/1590599780/)
> * Pro Nagios 2.0
> (http://www.amazon.com/gp/product/1590596099/)
> * Hardening Linux
> (http://www.amazon.com/gp/product/1590594444/)
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (Darwin)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFJx3BR9hTGvAxC30ARAm8MAKDHzbVZca+v6ASS82RmrTJrZaPAhQCgzLQS
> 1PZsXsBGxpjJqQV8GQfmV9o=
> =7rBP
> -----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to