On Thu, Mar 18, 2010 at 10:21 AM, Christopher Johnston
<[email protected]> wrote:
> I keep writing these exec types to things like service <something> restart,
> sounds like I dont need them and could just use subscribe which will in
> effect do the same thing.
> exec { 'sssd-restart':
> command => '/sbin/service sssd restart',
> refreshonly => true,
> require => File['/etc/sssd/sssd.conf']
> }
> It sounds like I just need to make my server subscribe to the file and
> eliminate the exec.
> -Chris
>
Exactly.
It looks like this:
package {'ntp': ensure => present }
file {'/etc/ntp.conf':
owner => 'root',
group => 'root',
mode => '644',
source => '/etc/puppet/files/ntp/ntp.conf',
require => Package['ntp'],
}
service {'ntpd':
enable => true,
ensure => running,
subscribe => File['/etc/ntp.conf'],
}
--Michael
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.