Puppet 傀儡和代理配置
实际上,我正试图从Puppet中创建一个代理,我面临一个问题 事实上,我的代理中有一个标准生成的puppet.conf文件,全局如下所示:Puppet 傀儡和代理配置,puppet,Puppet,实际上,我正试图从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=/et
[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
[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代理--genconfig
来了解其他属性
[agent]
# The server to which puppet agent should connect
server = mypuppet.server.org
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
# How often puppet agent applies the client configuration; in seconds.
# Note that a runinterval of 0 means "run continuously" rather than
# "never run." If you want puppet agent to never run, you should start
# it with the `--no-client` option.
# The default value is '1800'.
runinterval = 86400
我的
/etc/puppet/puppet.conf
中包含以下内容:
[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt
# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig
我只是在localconfig
server = host.fq.dn.com
对于puppet master,不需要在
puppet.conf
中进行更改
您需要在DNS中添加puppet
,您可以运行nslookup puppet
来获取其IP地址
例如,如果您没有dns服务器,那么应该将其添加到每个puppet代理的本地/etc/hosts
10.0.0.4 puppet puppet.example.com
之后,当您运行puppet代理-t
时,代理将自动与服务器puppet
通信
注意:确保puppet代理和主服务器之间的防火墙已打开