在Puppet 4看到以下错误 # /opt/puppetlabs/bin/puppet agent –verbose –no-daemonize –onetime Info: Using configured environment 'production' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Caching catalog for aus-lnaswgp-002.wiley.com Error: Failed to apply catalog: Parameter unless failed on Exec[sh /home/agile/svncheckout.sh]: 'test -f /home/agile/subversion.done' is not qualified and no path was specified. Please qualify the command or specify a path. at […]
Facter包含GCE(Google计算引擎)元数据详细信息: $ facter | grep gce gce => {"instance"=>{"attributes"=>{}, "description"=>"", "disks"=>[{"deviceName"=>"srvpup01", "index"=>0, "mode"=>"READ_WRITE", "type"=>"PERSISTENT"}, {"deviceName"=>"srvpup01-storage01", "index"=>1, "mode"=>"READ_WRITE", "type"=>"PERSISTENT"}], "hostname"=>"srvpup01.c.example.internal", "id"=>12345, "image"=>nil, "licenses"=>[{"id"=>"1000010"}], "machineType"=>"n1-standard-1", "maintenanceEvent"=>"NONE", "networkInterfaces"=>[{"accessConfigs"=>[{"externalIp"=>"", "type"=>"ONE_TO_ONE_NAT"}], "forwardedIps"=>[], "ip"=>"123.456.789.123", "ipAliases"=>[], "mac"=>"00:11:22:33:44:55", "network"=>"example"}], "scheduling"=>{"automaticRestart"=>"TRUE", "onHostMaintenance"=>"MIGRATE", "preemptible"=>"FALSE"}, "serviceAccounts"=>{"[email protected]"=>{"aliases"=>["default"], "email"=>"[email protected]", "scopes"=>["xxx"]}, "default"=>{"aliases"=>["default"], "email"=>"[email protected]", "scopes"=>["xxx"]}}, "tags"=>["no-public-ip"], "zone"=>"europe-west1-d"}, "project"=>{"attributes"=>{"google-compute-default-region"=>"europe-west1", "google-compute-default-zone"=>"europe-west1-d", "sshKeys"=>["… 有没有什么简单的方法像puppet模块中的“zone”属性那样访问,还是我必须自己parsing这个string? 像哈希访问它失败: gce is not a hash or array
我无法弄清楚Puppet如何inheritance和自动包含模块。 我有一个Puppet类,当我testing“本地”,但当我通过Puppet服务器将其推送到我的节点失败时,按预期工作。 “本地”意味着通过puppet apply运行并发送正确的本地模块path。 这是一个类的例子,发生了什么。 我试图把这个问题解决到产生这个问题的最less的事情,但是我承认我并不积极地认为我可以省略一些重要的东西。 我想要实现的是为现有模块编写新组件,而不会破坏已经包含旧模块的节点的向后兼容性。 我正在将一个写得不好的模块迁移到一个更合适的写法,我想分阶段推出它,而不会破坏现有的安装。 我的节点声明如下: node /myserver.*/ { include myclass::server } 清单声明如下: # File "myclass/manifests/init.pp" class myclass { file { '/etc/oldconfig.conf': ensure => file, owner => root, group => root, mode => '0644', source => 'puppet:///files/oldconfig.conf', } } # File "myclass/manifests/server.pp" class myclass::server { include myclass::next } # File "myclass/manifests/next.pp" class […]
按照什么顺序将数组映射到像require,subscription,before和notify这样的属性的资源执行? 另外,执行时,它会立即获取所有资源并行运行或同步吗? 例如, exec { 'A': } exec { 'B': } exec { 'C': } exec { 'D': require=>[ Exec['A'], Exec['B'], Exec['C'] ]} Exec['D']依赖于Exec[A], Exec[B]和Exec[C] 。 当Exec[D]有机会执行时,stream程将如何? A,B和C以任何顺序并行运行? 要么 先是A,然后是B,最后是C.依次运行,但没有一个资源等待前一个资源完成? 要么 首先是A,然后是B,但是等待A完成,然后开始,最后C等待B完成
如何用puppetpipe理自动缩放实例? 我想根据实例types来configurations / w堆栈(例如,如果是web,那么Apache或Nginx,如果应用程序,然后java或php)
我正在RHEL7.2上运行一个Puppet Enterprise Puppet Master(版本2016.2)。 我认为,假设傀儡代理人每30分钟一class。 但是当我注意到傀儡代理人运行我没有看到它运行。 我看看我的节点的报告,看到有一个1小时15分钟的报告。 我希望能够以编程的方式找出木偶代理何时在给定节点上再次运行。 这甚至有可能吗? 谢谢
我该如何configuration“init.pp”文件才能在同一个类中发送多个文件? 我所做的是这样的: class nagios { file { ['/usr/lib64/nagios/plugins/']: path => '/usr/lib64/nagios/plugins/', ensure => directory, notify => Service['nrpe'], source => ["puppet:///modules/mymodule/check_mem.sh", 'puppet:///modules/mymodule/check_mountpoint.sh'], sourceselect => all, } service { 'nrpe': ensure => 'running', enable => true, } } 我正在尝试发送两个不同的文件到同一个远程文件夹,然后重新启动服务。 但是,当我在客户端运行puppet时,出现这些错误: […] Error: Could not set 'file' on ensure: Is a directory – (/usr/lib64/nagios/plugins20170306-28992-j54k6x, /usr/lib64/nagios/plugins) at 153:/etc/puppet/modules/mymodule/manifests/init.pp […] […]
我经常在/etc/puppet/puppet.conf看到引用puppet.conf教程和说明。 我没有这个文件,但是我在安装了Puppet 4的电脑上安装了/etc/puppetlabs/puppet/puppet.conf 。 我只想确认这两个文件基本上是同等的? 是这样吗?
我正在为Puppet写一个ENC 。 目前我有一个基本的模板,这是连接和工作: #!/bin/bash if [ "$1" = beta.example.com ]; then echo "environment: beta" else echo "environment: production" fi 价值$1是由代理自动发送给我一个唯一的地址。 我想从代理发送另一个参数,以便我可以以$2访问设备的MAC地址。 如何修改代理程序连接过程以将额外的信息发送到我的ENC?
这是我清单中的片段: apache::vhost { 'default-http': port => 80, serveraliases => ['example.test.com', 'example2.test.com',], docroot => '/var/www/html', rewrites => [ { comment => 'Bounce to https', rewrite_cond => ['"%{SERVER_PROTOCOL}" "!^HTTP$"'], rewrite_rule => ['"^/?(.*)" "https://%{HTTP_HOST}/$1" [R=permanent,L]'], } ], } 正如你在下面的configuration中看到的,别名无处可寻: # Vhost template in module puppetlabs-apache # Managed by Puppet # ************************************ <VirtualHost *:80> ServerName default-http ## Vhost docroot […]