Puppet 服务器未应用清单

Puppet 服务器未应用清单

我使用四个节点进行了 Puppet/MCollective 设置。

  # mco ping
  Node-010.test.com                   time=107.58 ms
  Node-003.test.com                   time=110.68 ms
  Node-009.test.com                   time=114.42 ms
  Node-002.test.com                   time=116.49 ms

#mco puppet runonce 运行正常但未应用清单。

  # mco puppet runonce
  * [ ============================================================> ] 4 / 4
  Finished processing 4 / 4 hosts in 151.61 ms

我的清单配置如下:

   # puppet master --configprint manifest
   /etc/puppetlabs/code/environments/production/manifests

我的Site.pp如下

  # cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node default {
}
node 'Node-002.test.com'{
file {"/tmp/helloworld.txt":
      ensure => file,
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
      content =>" Hi ",
   }
  }

Site.pp 未被应用。

从日志文件来看,它似乎正在从缓存中读取并申请不存在规则的节点。

  ` # tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
2016-06-21 20:21:06,355 INFO  [qtp1367105977-65] [puppet-server] Puppet    Compiled catalog for Node-009.test.com in environment qa in 0.04 seconds
2016-06-21 20:21:08,223 INFO  [qtp1367105977-65] [puppet-server] Puppet Caching node for Node-002.test.com
2016-06-21 20:21:08,618 INFO  [qtp1367105977-69] [puppet-server] Puppet Caching node for Node-002.test.com 

我是否遇到了一些错误或者缺少一些配置项?

答案1

根据评论:代理要求提供环境qa,而您展示site.pp的是环境production。因此,最好仔细检查主控和代理双方的环境。:)

相关内容