所以我已经傀儡一段时间了,并认为开始使用环境会很好。当我在节点上运行puppet时,目录运行似乎已完成,但它没有读取我的清单(我在其中显示了一个通知)
所以在我的经纪人身上,我在puppet配置中有这个:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
[agent]
server = puppet.server.com
environment = live
当我跑步时,我得到了这个:
root@server:/var/lib/puppet/ssl# puppet agent --test --environment live
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Fact file /var/lib/puppet/facts.d/README was parsed but returned an empty data set
Info: Caching catalog for server.com
Info: Applying configuration version '1478692343'
Notice: Finished catalog run in 0.08 seconds
所以这一切看起来都不错,我也在主人身上看到了这个:
Compiled catalog for server.com in environment live in 0.01 seconds
但是在我的清单文件中,我已将其设置为确保正在阅读:
notify {'hey there i hit this env':}
以下是环境设置:
root@puppet:/etc/puppet/environments/live# ls
manifests modules
我甚至尝试过使用environment.conf并手动设置清单,环境中的这个或者有一个清单文件夹似乎都不起作用。清单目前名为site.pp,但也被称为live.pp。
现在,这是我对主人的傀儡:
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
certname = puppet.support.com
dns_alt_names = puppet.support.com
server = puppet.support.com
environmentpath = $configdir/environments
[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
有没有人知道为什么没有读取环境清单?为清楚起见,它在下面:
cat site.pp
notify {'hey there i hit this env':}
node 'server.com' {
notify {'hey there i hit this node':}
}
答案 0 :(得分:0)
“我怀疑你在环境缓存方面遇到了麻烦。更改或添加清单后,最好重新启动主服务器以使环境缓存无效。 - John Bollinger于16年11月9日在”