0
所以我一直在傀儡一段时间,并认为这将是很好的开始使用环境。当我在我的节点上运行的傀儡,目录来看似乎完成,但它不读我的清单(我把一个一个通知它没有出现)木偶目录运行完成但没有读取我的环境清单
所以对我的经纪人,我有这样的木偶配置:
[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
当我运行一个傀儡来看,我得到这样的:
[email protected]:/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':}
这里的环境设置:
[email protected]:/etc/puppet/environments/live# ls
manifests modules
使用environment.conf并设置我都甚至试图手动显示,这个或在环境中有一个清单文件夹似乎工作。清单目前名为site.pp,但也被称为live.pp。
现在,这里是主我的傀儡的conf:
[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':}
}
什么版本的Puppet?如果你刚刚开始使用环境,那么我会认为这是一个非常旧的版本,因为不使用它们是从3.5开始的警告和从3.7开始的错误,这两者早已不受支持。 –
感谢您的回复,正在使用3.8。 –
ii puppet 3.8.7-1puppetlabs1 –