人偶清单未运行 [英] Puppet manifest not running

查看:47
本文介绍了人偶清单未运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我过去常常像这样包含我所有的 puppet 模块:

I used to just include all of my puppet modules like so:

include user_manager
include pp_package_manager
include ppcc_code_manager
include ppcc_backup
include pp_db_manager
include pp_apache_manager
include pp_rabbit_manager
include pp_salt_manager
include pp_freeswitch_manager
include ppcc_services_manager

这导致了很多依赖问题,我不得不多次运行 puppet 代理才能全部解决.然后我尝试使用 Stages 来清理它,结果是:

This caused lots of dependency problems and I had to run the puppet agent multiple times before they would all resolve themselves. I then tried using Stages to clean that up, resulting in this:

stage { 'code': require => Stage['main'], before => Stage['backup'], }
stage { 'backup': before => Stage['big-packages'], }
stage { 'big-packages': before => Stage['freeswitch'], }
stage { 'freeswitch': before => Stage['services'] }
stage { 'services': }

node 'blah.example.com' {
  class { 'pp_package_manager': stage => 'main', }
  class { 'user_manager': stage => 'main', }
  class { 'ppcc_code_manager': stage => 'code', }
  class { 'ppcc_backup': stage => 'backup', }
  class { 'pp_db_manager': stage => 'big-packages', }
  class { 'pp_apache_manager': stage => 'big-packages', }
  class { 'pp_rabbit_manager': stage => 'big-packages', }
  class { 'ppcc_services_manager': stage => 'services', }
  class { 'pp_salt_manager': stage => 'big-packages', }
  class { 'pp_freeswitch_manager': stage => 'freeswitch', }
}

我什至尝试将所有内容都放在节点定义中,使用箭头符号,在之前定义阶段,然后使用箭头符号.每一次,什么都没发生.没有错误,只是没有.即使使用 --debug,傀儡代理也会……停止.

I even tried putting everything in the node definition, using arrow notation, defining the stages before and then using arrow notations. Each time, nothing happened. No errors, just nothing. Even using --debug, the puppet agent would just... stop.

最后,我只是尝试在每个类声明之间使用箭头符号.

Finally, I just tried using arrow notations between each of the class declarations.

class { 'user_manager': } ->
class { 'pp_package_manager': } ->
class { 'ppcc_code_manager': } ->
class { 'ppcc_backup': } ->
class { 'pp_db_manager': } ->
class { 'pp_apache_manager': } ->
class { 'pp_rabbit_manager': } ->
class { 'pp_salt_manager': } ->
class { 'pp_freeswitch_manager': } ->
class { 'ppcc_services_manager': }

那也没有运行.我现在几乎没有想法了.为什么我运行 puppet 代理时什么也没有发生?我做错了什么?

That didn't run either. I'm pretty much all out of ideas now. Why is nothing happening when I run the puppet agent? What am I doing wrong?

推荐答案

如果不看看你的清单是什么样子,我真的无法评论这些问题.

I can't really comment on the issues without seeing what your manifests look like.

但我认为有些东西可以帮助您:您是否了解过角色和配置文件模式?它有助于解决此类设计问题,并有助于缩小导致问题的清单.

But I think there is something that could help you: Have you read about the roles and profiles pattern? It helps with these kind of design issues and helps narrowing down which manifests are causing problems.

它还允许您对每个组件或组件组进行测试,这样您就可以缩小导致代理无法运行的问题的范围.

It also allows you to apply testing to each component or group of components, so you can narrow down what the issue is that's causing the agent not to run.

这里有一些关于它的示例帖子:

Some example posts about it here:

https://puppetlabs.com/presentations/designing-puppet-rolesprofiles-patternhttp://garylarizza.com/blog/2014/02/17/puppet-workflow-part-2/http://rnelson0.com/2014/07/14/intro-to-roles-and-profiles-with-puppet-and-hiera/

这篇关于人偶清单未运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆