我公司的Linux服务器是由Foreman安装的Puppetconfiguration和pipe理的。
在看Foreman仪表板时,我可以看到95%的服务器显示为同步和更新(蓝色图标),而20台没有已知共同点的服务器显示为未更新且未更新。
在任何Puppet代理(更新的或未更新的代理)上查看/etc/puppet/puppet.conf文件时,我看到它的configuration如下所示:
[main] # The Puppet log directory. # The default value is '$vardir/log'. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is '$vardir/run'. rundir = /var/run/puppet # Where SSL certificates are kept. # The default value is '$confdir/ssl'. ssldir = $vardir/ssl [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
这是包装附带的默认configuration。
你可以看到在[agent]部分下,只有configuration的指令是classfile和localconfig而在Puppet服务器的/etc/puppet/puppet.conf ,'[agent]'部分是这样的:
[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 '$statedir/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 # Disable the default schedules as they cause continual skipped # resources to be displayed in Foreman - only for Puppet >= 3.4 default_schedules = false report = true pluginsync = true masterport = 8140 environment = production certname = puppet.nj.company.com server = puppet.nj.company.com listen = false splay = false runinterval = 1800 noop = false configtimeout = 120
所以我的问题是:
服务器上[agent]下的大部分设置都是默认设置,您不需要将它们复制到客户端。 唯一真正重要的是server如果puppet的默认值(依靠search域)是不够的。 既然你说运行Puppet手动工作,我猜你甚至不必担心。
这听起来像你的客户没有运行Puppet代理服务。 启动它并确保它被configuration为在启动时启动。
Puppet使用拉模式,因此您需要运行代理以从主服务器获取configuration,默认情况下,代理作为服务运行时每30分钟一次。 通常情况下,您需要将代理configuration为在configuration期间在启动时启动。
例如运行service puppet start或systemctl start puppet (systemd),如果您在Red Hattypes的操作系统上,也运行systemctl enable puppet (systemd)或chkconfig puppet on 。