Articles of 傀儡

傀儡节点随意更新

什么是最好的方法(或任何事情)告诉傀儡节点更新,当我做了一个更改site.pp实例,并需要它立即部署? 我想到了每个节点上执行“sudo puppetd ​​–test”。 我想知道是否有更好的/其他的方法来做到这一点。

在Vagrant VM中导入Puppet预先生成的SSL密钥对的好方法?

我想设置Vagrant来使用我当前的Puppet master作为提供者。 但是我不喜欢在.box文件中embeddedSSL密钥对的.box 。 我目前正在做的是使用Vagrant文​​件分发Puppet代理的ca.pem,public,private和cert密钥文件,并使用此shell脚本来引导Puppet代理: $puppet_ssl = <<SCRIPT sudo mkdir -p /var/lib/puppet/ssl/{certs,private_keys,public_keys} sudo chown puppet /var/lib/puppet/ssl/{certs,private_keys,public_keys} sudo cp /vagrant/puppet/certs/appdev.mydomain.com.pem /vagrant/puppet/certs/ca.pem /var/lib/puppet/ssl/certs/ sudo cp /vagrant/puppet/private_keys/appdev.mydomain.com.pem /var/lib/puppet/ssl/private_keys/ sudo cp /vagrant/puppet/public_keys/appdev.mydomain.com.pem /var/lib/puppet/ssl/public_keys/ SCRIPT 这似乎工作正常, 如果开发人员有文件,一切都在正确的目录。 我的问题:有没有更好的方式来分发任何需要预先加载到Vagrant虚拟机的文件,而无需将其embedded到.box文件中?

使用Puppet Hiera将相同的参数值传递给多个类

我正在使用Hiera和Puppet,我想将相同的参数值传递给多个类而不重复。 现在我已经(在Yaml): — class_a::database_server: myoraclebox.example.com class_b::database_server: myoraclebox.example.com 这有效,但我怎么才能指定服务器只有一次,仍然使用Puppet的自动参数查找? (我宁愿不在我的清单中embedded明确的Hiera查找,因为这会将它与Hiera耦合。)

如何运行hiera独立testing值?

假设在我的木偶大师身上,我可以从命令行运行hiera来查看特定的节点如何生成一个variables集合,但是真的很难find一个可行的例子。 我试过使用木偶库存和使用mcollective,两个都有一个错误: [root@puppet001 hiera]# hiera -c /etc/puppet/hiera.yaml -i pamcontent001.mgs.example.com Puppet inventory service lookup failed: NoMethodError: undefined method `features' for Puppet:Module Could not load Puppet inventory service scope: SystemExit: exit [root@puppet001 hiera]# hiera -c /etc/puppet/hiera.yaml -m pamcontent001.mgs.example.com MCollective lookup failed: LoadError: cannot load such file — mcollective Could not load MCollective scope: SystemExit: exit search这些错误信息发现一些旧的错误和修复,但没有任何工作会给我一个testing查询。 当你得到意想不到的价值时,你如何testing和debuggingheira查找?

模块中的Puppet类的依赖关系

目前,我正在编写一个pipe理我的敏感configuration的傀儡模块。 已经把整个事物分成几个类,并把它们放在sensu“manifests”目录下的相应文件中: sensu::common (common.pp) sensu::common::package (common/package.pp) sensu::common::config (common/config.pp) sensu::server (server.pp) sensu::server::config (server/config.pp) 在我的server.pp ,我有以下 class sensu::server { include sensu::common include sensu::server::config Class['sensu::common'] -> Class['sensu::server::config'] } 和nodes.pp看起来像这样: class role_monitoring_server { $my_role = 'monitoring_server' … include sensu::server } node my_cool_server { include role_monitoring_server } 由于你大部分人可能已经猜到了,我有server.pp的类依赖问题: Class['sensu::common'] -> Class['sensu::server::config'] 只是不行。 类sensu::server::config需要在一个目录中放置一个文件,这个文件只能被sensu::common创build。 问题是, sensu::server::config将始终在sensu::common之前应用,而不是像预期的那样。 我错过了什么? networking上有这么多的问题,但我没有find答案,因为我不知道该找什么。

Puppet:访问更复杂的hieradata yaml文件的var / val

我一直在谷歌search,并没有看到任何更复杂的hieradata yamlconfiguration的例子。 考虑一下: # /path/to/hieradata/vhost/config.yaml vhost_config_melikedev: port: 53002 framework: wordpress static_asset_dirs: – wp-content vhost_config_melikedrinks: port: 53001 framework: symfony static_asset_dirs: – image – js – css 我将如何访问vhost_config_melikedev条目的端口值?

木偶重复声明错误

我正在运行一个Error: Duplicate declaration与我的木偶项目Error: Duplicate declaration 。 我想部署jboss实例,其中一部分是一些特殊的configuration文件。 只要我创build第二个实例,应该包含与第一个实例相同的特殊configuration文件,我得到提到的错误。 我创build一个像这样的实例: jbossas::instance { 'node01': … propfiles => [ "kupo.properties", "web.properties" ], } 在jboss :: instance是这样的代码: if ($propfiles != {}) { jbossas::makepropies { $propfiles: version => $version, instancedir => $instancedir, jboss_name => $name, } } 最后makepropies代码: define jbossas::makepropies ( $file = $title, $version = 7, $instancedir = '', […]

在模块path上找不到安装的模块

我试图在使用Vagrantconfiguration虚拟机时使用maestrodev / rvm模块,但在尝试include rvm时遇到了问题。 我不断收到 Error: Could not find class rvm for vagrant-ubuntu-saucy-64 on node vagrant-ubuntu-saucy-64 Error: Could not find class rvm for vagrant-ubuntu-saucy-64 on node vagrant-ubuntu-saucy-64 我看到两次相同的错误,并且在任何其他输出之前看到它。 我已经安装了模块使用 puppet module install maestrodev/rvm 并运行这个命令后, puppet config print modulepath的输出puppet config print modulepath /home/notgary/.puppet/modules:/usr/share/puppet/modules 而puppet module list产量 /home/notgary/.puppet/modules ├── maestrodev-rvm (v1.2.0) ├── puppetlabs-apache (v0.9.0) ├── puppetlabs-concat (v1.0.0) […]

stream浪者的傀儡提供者没有正确阅读hiera.yaml后端?

我有一个傀儡问题,具体到stream浪者使用清单/模块/ hiera-config与其木偶供应​​商的方式,因为“puppet apply site.pp”在生成的stream浪汉部署的VM(当在本地应用客户操作系统本身)。 在Vagrantfile的目录中,我有一个“puppet_files”子目录,其中有清单,模块和hiera文件,将被复制到VM上的/ etc / puppet(我使用带有“file”伪指令的puppet模块来复制这些文件)。 我的主机环境是OSX,我正在使用vagrant在VirtualBox上部署Centos 6。 背景信息: 当我input“vagrant up”时,我看到这个开头是: ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM… ==> default: Setting hostname… ==> default: Mounting shared folders… default: /vagrant => /Users/juser/vm_stuff/vagrant-fresh default: /tmp/vagrant-puppet-1/manifests => /Users/juser/vm_stuff/vagrant-fresh/puppet_files/manifests default: /tmp/vagrant-puppet-1/modules-0 => /Users/juser/vm_stuff/vagrant-fresh/puppet_files/modules ==> default: Running provisioner: shell… 因此,它看起来像在我的OSX文件系统上创build临时文件,并从Vagrantfile中指定的位置复制源目录/文件。 在虚拟机本身puppet目录被适当地挂载为/ […]

如何安装并运行Puppet设备以configurationCisco交换机和路由器?

根据这个文档 ,应该可以通过使用Puppet模块设备来configuration思科交换机。 哪里可以find这个模块? 这个模块是否仅限于Puppet Enterprise? 如何安装并运行它以configurationCisco交换机? 咨询来源: 来源1 源2 source3 source4