The Core Types Cheat Sheet at
http://projects.puppetlabs.com/projects/puppet/wiki/Core_Types_Cheat_Sheet/
says:
The Trifecta
Package/file/service: Learn it, live it, love it. If you can only do this,
you can still do a lot.
package { 'openssh-server':
ensure => installed,
}
file { '/etc/ssh/sshd_config':
source => 'puppet:///modules/sshd/sshd_config',
owner => 'root',
group => 'root',
mode => '640',
notify => Service['sshd'], # sshd will restart whenever you edit this file.
require => Package['openssh-server'],
}
service { 'sshd':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}
I can see two problems with this example, and rather than open a ticket I
wanted to make sure I haven't overlooked something.
1. Is there any special magic requiring that the config file exist before
Puppet starts the sshd service?
If not, shouldn't there be a requires in the service on the config file?
2. The sentence "sshd will restart whenever you edit this file." is a bit
confusing, because it hints at puppet using some kind of inotify mechanism
to restart sshd when the config file changes.
Would it be better to write that sshd will restart whenever puppet updates
this file?
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/RHxeCDUWpPQJ.
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.