使用Puppet 3.2.1尝试服务器/客户端设置,在同一主机上运行。
我也用puppet-dashboard和puppetdb。
我的清单/ init.pp:
node 'my.fqdn' { file { '/tmp/test': ensure => present }
运行puppet agent --test --server my.fqdn --report其中,my.fqdn和仪表板在/ etc / hosts中定义
产量:
Info: Retrieving plugin Info: Loading facts in /etc/puppet/modules/concat/lib/facter/concat_basedir.rb Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/puppi_projects.rb Info: Loading facts in /etc/puppet/modules/puppi/lib/facter/last_run.rb Info: Loading facts in /var/lib/puppet/lib/facter/puppi_projects.rb Info: Loading facts in /var/lib/puppet/lib/facter/concat_basedir.rb Info: Loading facts in /var/lib/puppet/lib/facter/last_run.rb Info: Caching catalog for my.fqdn Info: Applying configuration version '1369841032' Notice: Finished catalog run in 0.08 seconds Changes: Events: Resources: Skipped: 6 Total: 7 Time: Config retrieval: 0.42 Total: 0.42 Last run: 1369841033 Filebucket: 0.00 Version: Config: 1369841032 Puppet: 3.2.1
文件/tmp/test永远不会被创build!
也;
傀儡仪表板sais说,它没有任何节点的知识(EG报告从来没有达到它)
用于报告的puppet.conf:
reports = store, http reporturl = http://puppet.armed.us/reports/upload
这里会发生什么,以及如何解决?
运行puppet apply /etc/puppet/manifests/init.pp工作,但不是当试图从木偶主人得到configuration。 这就像是获得一个空白的目录。
*编辑 :
puppet.conf:
[main] vardir = /var/lib/puppet logdir = /var/log/puppet rundir = /var/run/puppet templatedir = /var/lib/puppet/templates ssldir = $vardir/ssl usecacheonfailure = true user = puppet group = puppet [agent] certname = my.fqdn server = my.fqdn pluginsync = true report = true reportserver = my.fqdn summarize = true graph = true listen = false runinterval = 1800 classfile = $vardir/classes.txt localconfig = $vardir/localconfig [master] masterport = 8140 bindaddress = 0.0.0.0 autosign = false storeconfigs = true environment = production manifest = $confdir/manifests/site.pp modulepath = /etc/puppet/modules:/usr/share/puppet/modules storeconfigs_backend = puppetdb reports = store, http reporturl = http://my.fqdn/reports/upload facts_terminus = active_record
和证书:
root@my:~# puppet cert list --all + "my.fqdn" (SHA256) E1:F0:29:1...:31:93:F9
你应该重新命名清单/ init.pp到manifest / site.pp,就像你在puppet.conf中configuration的那样
my.fqdn实际上是主人知道该代理的签名证书名称吗? 听起来像证书名称可能不符合您的节点定义,因此它忽略节点部分。
您可以尝试强制代理报告的名称,看看是否有窍门:
puppet agent --test --server my.fqdn --report --certname my.fqdn
我不知道您的网站是否属于这种情况,但我需要pluginsync = true,这样一些puppetconfiguration才能正常工作。 没有它在节点上的/etc/puppet/puppet.conf中,puppet运行不会失败,但不会完成我所期望的(例如,使用file_line)。
我看到你把它放在主puppet.conf上,但是检查它是否也在节点上。
我想知道你的傀儡服务器是否理解你的客户端应该是my.fqdn。 将节点“my.fqdn”更改为节点默认值,然后查看是否获取了该文件。
你有没有把你的节点puppet.conf放在[agent]部分这个指令(并重新启动)? report = true