我使用puppet来管理linux服务器和各种服务。除了人偶服务本身以外,它运作良好。
我的木偶课是这样的:
class puppet {
file { "/etc/puppet/puppet.conf":
owner => 0, group => 0, mode => 0644,
content => template("${module_name}/puppet.conf.erb"),
}
service { "puppet":
name => "puppet",
ensure => running,
enable => true, hasstatus => true, hasrestart => true,
require => File["/etc/puppet/puppet/conf"]
subscribe => File["/etc/puppet/puppet/conf"]
}
}
}
当对/etc/puppet/puppet.conf应用更改时,puppet注意到它需要重新启动puppet服务,因此,崩溃本身:
Mar 30 17:08:23 XXXX puppet-agent[20172]: (/Stage[main]/Puppet/File[/etc/puppet/puppet.conf]/content) content changed '{md5}eeaf5dfc7d88c8d9c85e6a8cc714d702' to '{md5}ef6ff0e423f4125e24b689980df9f71d'
Mar 30 17:08:23 XXXX puppet-agent[20172]: Caught TERM; calling stop
你知道我如何用puppet正确更新puppet.conf吗?