你好,当我将我的 site.pp 应用到客户端时,出现了上述错误,又是这样:
Error: Could not run command from prerun_command: Execution of '/etc/puppet/etckeeper-commit-pre' returned 1:
我的 puppet 大师上的 Puppet.conf:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
certname=darmstadtium.shadowk.at
dns_alt_names=darmstadtium.shadowk.at
manifest=/etc/puppet/manifests/
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
puppet.conf on agent:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server=darmstadtium.shadowk.at
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY
使用 puppet 4.8.2 全新安装 (debian stretch) 时遇到同样的错误。似乎 etckeeper_command_pre 和 etckeeper_command_post 没有被复制到/etc/puppet/中,puppet.conf 说它们应该是。
我在/usr/share/doc/puppet/examples/etckeeper-integration/中找到它们(使用 locate),然后复制到/etc/puppet 中并对它们执行 chmod +x。
puppet agent -t 在这之后像魅力一样跑了起来。
我是一名优秀的程序员,十分优秀!