Articles of 傀儡

在Augeas中使用'\'表示多行值

我最近在Augeas组装了一个镜头,现在它不能按照要求工作。 我的文件包含几个使用以下语法的引用: Value1 = KEY 32 OR\ KEY 33 OR\ …. 我如何表示反斜线换行符组合并将其视为同一个值的一部分? 编辑 – 我运行的版本.10.0 … let comment = IniFile.comment IniFile.comment_re IniFile.comment_default let sep = IniFile.sep IniFile.sep_re IniFile.sep_default let empty = IniFile.empty let setting = IniFile.entry_re let title = IniFile.indented_title_label "target" IniFile.record_label_re let entry = [ key IniFile.entry_re . sep . IniFile.sto_to_comment . (comment|IniFile.eol) ] […]

如何在augeas中复制一个分支

有没有一种现成的方式来在augeas或通过puppet augeas处理程序本地复制一个分支? 如果复制操作符本身在augeas中可用,则会是这样的 cp /files/etc/grub.conf/title[1]/ /files/etc/grub.conf/title[99]/ 在我的情况下,这是在grub.conf中的“title [x]”部分,但是我确定同样的东西在其他地方是适用的。

在木偶中使用Hiera NTP的例子不起作用

我目前正试图重build这里描述的例子 问题是,当我尝试获取ntp :: serversvariables时,出现以下错误,这是我在理解时遇到的问题。 hiera ntp::servers ::fqdn=debian /usr/lib/ruby/vendor_ruby/hiera/backend.rb:18:in `[]': can't convert Symbol into Integer (TypeError) from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:18:in `datadir' from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:98:in `datasourcefiles' from /usr/lib/ruby/vendor_ruby/hiera/backend/yaml_backend.rb:16:in `lookup' from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:206:in `block in lookup' from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:203:in `each' from /usr/lib/ruby/vendor_ruby/hiera/backend.rb:203:in `lookup' from /usr/lib/ruby/vendor_ruby/hiera.rb:60:in `lookup' from /usr/bin/hiera:225:in `<main>' 我正在考虑一些可怕的故事 您的hiera.yaml文件与我们提供的示例相匹配 你已经把一个符号链接到hiera.yaml,命令行工具希望find它(/etc/hiera.yaml) 您已将.yaml扩展名保存为kermit.example.com数据源文件 您的数据源文件的YAML格式正确 如果你修改了hiera.yaml,你重新启动了木偶大师 我的/etc/puppet/hiera.yaml。 (有点不同,但它也应该工作) :backends: – yaml – puppet :yaml: […]

Foreman-Installer安装失败 – puppet cert – 生成FQDN返回23而不是 – Ubuntu 14.04

我试图在我的Ubuntu 14.04服务器上安装Foreman serveral时间。 工头1.5和1.6总是失败,同时出现以下错误: /usr/bin/puppet cert –generate ubuntutest.domain.com returned 23 instead of one of [0] /Stage[main]/Puppet::Server::Config/Exec[puppet_server_config-generate_ca_cert] /returns: change from notrun to 0 failed: /usr/bin/puppet cert –generate ubuntutest.domain.com returned 23 instead of one of [0] /Stage[main]/Puppet::Server::Config/Exec[puppet_server_config-generate_ca_cert]: Failed to call refresh: /usr/bin/puppet cert –generate ubuntutest.domain.com returned 23 instead of one of [0] /Stage[main]/Puppet::Server::Config/Exec[puppet_server_config-generate_ca_cert]: /usr/bin/puppet cert –generate ubuntutest.domain.com […]

傀儡模板,如果定义的语法

我无法在Puppet文档中find解决scheme。 我想在Puppet模板中定义一个variables。 例如: 如果class graylog2和apache类在节点类节中定义,那么模板将这些variables放在configuration文件中: # Apache logging local5.* @<%= @server_gl -%>:<%= @service_port_gl -%> <- This part has to inserted if defined graylog2 class and apache class in node file local5.info ~ local5.err ~ # Nginx logging local4.* @<%= @server_gl -%>:<%= @service_port_gl -%> <- This part has to be inserted if defined graylog2 class and […]

如何解决`没有发送请求,我们没有发现任何节点`而试图使用MCollective运行Puppet?

MCollective [vagrant@localhost ~]$ mco ping localhost.localdomain time=117.12 ms —- ping statistics —- 1 replies max: 117.12 min: 117.12 avg: 117.12 [vagrant@localhost ~]$ mco inventory localhost.localdomain Inventory for localhost.localdomain: Server Statistics: Version: 2.6.1 Start Time: Sat Nov 22 23:59:59 +0000 2014 Config File: /etc/mcollective/server.cfg Collectives: mcollective Main Collective: mcollective Process ID: 3364 Total Messages: 3 Messages […]

傀儡伪造的LVM模块随机打破应用清单

当使用lvm模块时,我们随机得到一个“无效的参数size_is_minsize”。 如果我们重新启动木偶大师,错误消失了一段时间,但随后又回来了。 这是在Scientific Linux 6.6(RHEL6衍生物)上。 puppet-3.7.2-1.el6.noarch在客户端。 工头1.7.2在服务器上… [root @ lnx586〜]#木偶代理-t 警告:本地环境:“生产”与服务器指定节点环境“dev”不匹配,将代理切换到“dev”。 信息:检索插件 信息:检索插件 信息:加载事实 错误:无法从远程服务器检索目录:SERVER上的错误400:无效的参数size_is_minsize Logical_volume [tmp]在/mnt/puppet/etc/environments/dev/modules/sge/manifests/init.pp:10节点lnx586上 警告:在失败的目录上不使用caching 错误:无法检索目录; 跳过跑步 重新启动木偶大师。 [root @ lnx586〜]#木偶代理-t 警告:本地环境:“生产”与服务器指定节点环境“dev”不匹配,将代理切换到“dev”。 信息:检索插件 信息:检索插件 信息:加载事实 信息:cachinglnx586的目录 信息:应用configuration版本“1424461702” 注意:完成的目录在15.46秒内运行 [root @ lnx586〜]#木偶代理-t 警告:本地环境:“生产”与服务器指定节点环境“dev”不匹配,将代理切换到“dev”。 信息:检索插件 信息:检索插件 信息:加载事实 信息:cachinglnx586的目录 信息:应用configuration版本“1424461767” 注意:完成的目录在15.69秒内运行 [root @ lnx586〜]#木偶代理-t 警告:本地环境:“生产”与服务器指定节点环境“dev”不匹配,将代理切换到“dev”。 信息:检索插件 信息:检索插件 信息:加载事实 错误:无法从远程服务器检索目录:SERVER上的错误400:无效的参数size_is_minsize Logical_volume [tmp]在/mnt/puppet/etc/environments/dev/modules/sge/manifests/init.pp:10节点lnx586上 警告:在失败的目录上不使用caching 错误:无法检索目录; 跳过跑步

如何通过木偶运行augeas追加到相同的variables?

我有以下资源声明来通过木偶中的augeas设置setenv.sh文件。 augeas {'test': lens => 'Properties.lns', incl => '/tmp/setenv.sh', changes => "set CATALINA_OPTS \" $CATALINA_OPTS -XX:PermSize=192m -XX:MaxPermSize=192m \"", } 我遇到了上述几个问题。 该文件基本上将configuration附加到CATALINA_OPTSvariables,这意味着当我运行augeas它将删除该variables的所有实例,并用我的更改replace它。 我怎样才能做到以下几点? CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/appdynamics/appagent/javaagent.jar" CATALINA_OPTS="$CATALINA_OPTS -XX:PermSize=192m -XX:MaxPermSize=192m" 试图运行上述由于报价失败。 debugging输出显示: Debug: Augeas[test](provider=augeas): sending command 'set' with params ["/files/tmp/setenv.sh/CATALINA_OPTS", " -XX:PermSize=192m -XX:MaxPermSize=192m "] Debug: Augeas[test](provider=augeas): Put failed on one or more files, output from /augeas//error: Debug: Augeas[test](provider=augeas): […]

可以使用hiera将parameter passing给puppet

我们正在使用angular色/configuration文件模式。 在下面的例子中,我希望可以select传递一个hiera参数,这样如果没有提供值,就使用:: apache类的默认值(它从内部获取:: apache :: params类)。 这将使我们能够在一些服务器上设置keepalive值,但是当我们不这样做时,允许:: apache类来确定它自己的值。 common.yaml ———– profiles::apache::keepalive : On profiles::apache::keepalive_timeout : 5 apache.pp ——— class profiles::apache { $apache_keepalive = hiera('profiles::apache::keepalive') $apache_keepalive_timeout = hiera('profiles::apache::keepalive_timeout') class {'::apache': keepalive => $apache_keepalive, keepalive_timeout => $apache_keepalive_timeout, } } 我已经尝试将hiera查找的默认值设置为“undef”,但是最后我在configuration中使用了空值。

在Vagrant中向Puppet添加包提供程序

我正在使用Puppet来configurationVagrant box,并希望包含第三方软件包提供者( https://github.com/torrancew/puppet-cpanm ) 该回购协议中的README.md显示了如何在清单中使用提供者,但是假设(我相信)这个提供者有或知道这个提供者。 有了我的stream浪安装,我真的没有一个木偶大师(或stream浪者作为一个?),所以我不知道如何实际使用包提供程序类( https://github.com/torrancew/puppet-cpanm /blob/master/lib/puppet/provider/package/cpanm.rb ) 我需要做什么,无论是在我的Vagrantfile,我的Puppet清单,还是在guest / host系统configuration中的其他地方,我都可以使用这个软件包提供程序?