Puppet 目录 运行 正在完成但未读取我的环境清单
Puppet catalog run completeing but not reading my environment manifest
所以我已经玩偶一段时间了,我认为开始使用环境会很好。当我在我的节点上 运行 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。
现在,这是我在 master 上的 puppet 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':}
}
"I suspect that you are running into trouble with the environment cache. After changing or adding manifests, it's a good idea to restart the master to invalidate the environment cache. – John Bollinger Nov 9 '16 at"
所以我已经玩偶一段时间了,我认为开始使用环境会很好。当我在我的节点上 运行 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。
现在,这是我在 master 上的 puppet 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':}
}
"I suspect that you are running into trouble with the environment cache. After changing or adding manifests, it's a good idea to restart the master to invalidate the environment cache. – John Bollinger Nov 9 '16 at"