Articles of 木偶

使用木偶来确保stream浪箱被升级

我使用木偶来提供一个stream浪盒子(在这种情况下是Ubuntu)。 在最初启动vagrant box( vagrant up )之后,运行apt-get upgrade将列出几个更新。 我想在第一次启动时运行这些升级,但是在运行apt-get升级时却遇到了麻烦: # run apt-get update exec { "apt-update": command => "/usr/bin/apt-get update" } # run apt-get upgrade exec { "apt-upgrade": command => "apt-get upgrade -y", path => "/usr/bin:/usr/sbin:/bin:/usr/local/bin", require => Exec['apt-update'], } 以下内容失败: err: /Stage[main]//Exec[apt-upgrade]/returns: change from notrun to 0 failed: apt-get upgrade -y returned 100 instead of […]

木偶:replace参数的实际名称

这是自定义事实: require 'etc' Etc.passwd do |user| Facter.add("homedir_#{user.name}".intern) do setcode { user.dir } end end 它确定用户的主目录位置。 这里是定义types: define ssh_keys::key ($user) { $home = $::homedir_#{user} if $home != undef { file { "$home/.ssh/": ensure => directory, } file { "$home/.ssh/authorized_keys": ensure => file, source => "puppet:///modules/ssh_keys/$user", } } } 它不能和$::homedir_#{user} ,但是可以使用$::homedir_root 。 这里有什么问题?

需要帮助的翻译速率限制iptables规则傀儡格式

我使用Puppet Iptables模块来pipe理我的机器上的Iptables规则。 我想实现的速率限制失败的SSH连接,如下所述: iptables -A INPUT -p tcp –dport 22 -m recent –update –seconds 60 –hitcount 5 –name SSH –rsource -j DROP iptables -A INPUT -p tcp –dport 22 -m recent –set –name SSH –rsource -j ACCEPT 是否有可能将其翻译成Puppet语法,如 firewall { '015 drop 5 failed attemps to connect to SSH in a minute ': proto => […]

Vcsrepo与gitlab失败

我想使用vcsrepo拉一些gitlab仓库,但由于某种原因,它无法执行。 vcsrepo { "/tmp/repo/update": ensure => present, provider => git, source => "git@gitlab:${git_url}", user => 'update', } ssh密钥属于用户更新,源无法使用或不使用'git @' 错误: err:/ Stage [main] // Node [xxx] / Git :: Add_git [webhooks] / Vcsrepo [/ tmp / webhooks / update] /确保:从缺席变成失败:无法设置'present on ensure:undefined方法`执行'Puppet :: Util :: Execution:模块在/tmp/vagrant-puppet-2/modules-0/git/manifests/init.pp:54 我做错了什么?

设置一个非CA木偶大师

我想build立一个额外的木偶大师作为非CA服务器。 我已经安装并成功使用Passenger。 有问题的服务器都运行CentOS 6.6,并且都在同一个networking上。 Selinux已经放任了。 testing环境由三个服务器组成,如下所示: 1. HOSTNAME=basxtststinfl01, DNS=puppet.xchanginghosting.com,basxtststinfl01.xchanginghosting.com (CA Master) 2. HOSTNAME=basxtststinfl02, DNS=basxtststinfl02.xchanginghosting.com (non-CA Master) 3. HOSTANME=basxtststinfl03, DNS=basxtststinfl03.xchanginghosting.com (Agent) 我已经configuration了我的第二个木偶大师(非CA),如下所示: [main] dns_alt_names = basxtststinfl02.xchanginghosting.com,basxtststinfl02 ca_server = basxtststinfl01.xchanginghosting.com [master] ca = false 我删除了非CA puppet master上的原始证书,并在添加了dns_alt_names之后但在ca和ca_servers之前重新生成了另一个证书。 + "basxtststinfl01.xchanginghosting.com" (SHA256) E6:5D:56:39:16:22:A0:FD:8A:C1:AF:83:EB:80:94:2D:74:CE:1F:75:D5:3A:F7:92:EF:36:1A:85:4C:EA:58:F2 (alt names: "DNS:basxtststinfl01", "DNS:basxtststinfl01.xchanginghosting.com", "DNS:puppet", "DNS:puppet.xchanginghosting.com") 这是迄今为止的正确方法吗? 我的虚拟主机文件如下所示: LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-4.0.59/buildout/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-4.0.59 PassengerDefaultRuby /usr/bin/ruby PassengerMaxRequests […]

在2015.03发布之后,puppet 3.7不会在Amazon linux上安装

嗨,我是/正在使用亚马逊Linux和使用RHEL 6 puppetlabs存储库升级安装的木偶客户端从2.7到3.7。 随着最新版本的亚马逊Linux 2015.03 这个过程提出了错误 25-Mar-2015 13:06:59 amazon-ebs:Error:Package:puppet-3.7.4-1.el6.noarch(puppetlabs) 25-Mar-2015 13:06:59 amazon-ebs:需要:ruby(selinux) 我的代码安装木偶是: sudo rpm -Uvh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-11.noarch.rpm cd /etc/yum.repos.d/ sudo rpm –import http://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs sudo yum -y update sudo yum install -y puppet facter augeas 我目前的工作是基本上停止使用木偶仓库和使用亚马逊提供的: sudo yum -y update sudo yum install -y puppet3 facter2 augeas 任何有关如何使用当前傀儡RHEL 6或其他存储库的build议将不胜感激。

当使用DSC模块时,文件是否是current.mof瓶颈?

msutter DSC模块(PowerShell Defined State Configuration)似乎有一个瓶颈。 每个使用DSC资源的类都会生成中间的Powershell / DSC代码,在同一个目录中创build一个名为current.mof的文件。 当我运行Puppet代理 – testing事情变得棘手。 似乎一个傀儡class正在获得与不同傀儡class有关的信息,就好像它产生了MOF,然后偶然地执行了另一个class的MOF。 我想我可以find一种方法来链接所有这些资源与依赖性箭头,以便他们顺序执行,但这意味着我不能真正单独的configuration文件类为每个ZIP档案我开箱。 我更喜欢一个服务器得到类A,B和C,另一个得到B,C等。如果我把链接,那么我必须复制大量的代码。 我正确的吗? 我是PowerShell的新手。 下面是一个从Web服务中提取ZIP文件并将其解压缩到目标位置的类的示例: # This profile class installs the BookingsUI package from a URI specified in the global ::package_source variable class phoenix_profiles::archive_test { $archive_file = "BookingsUI.zip" $drive = pick($::destination_drive, 'd:') # $staged_archive_path = "${drive}/eftours/packages/${archive_file}" $staged_archive_path = "${drive}/temp/puppet_archive_test/source/${archive_file}" dsc_xremotefile { "download ${archive_file}": […]

傀儡代理不能自动运行

除了木偶大师列出的木偶大师外,我还有两个节点。 这两个目前列为无响应。 傀儡代理似乎没有自动运行。 在我列出的代理日志中: Pastie链接有点长: http : //pastie.org/private/uaagvz7tfqtuzboyuppztw 但是,如果我手动运行木偶代理-t: root@ex:/var/log# puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Info: Caching catalog for sea2.impactvps.net Info: Applying configuration version '1430058342' Notice: Finished catalog run in 1.00 seconds 它运行没有问题,然后出现在主人的响应。 直到它无法在下一次运行时自动运行。 操作系统是Debian 7 将不胜感激任何可以提供的帮助。

如何通过木偶和提供商安装rpm作为yum

我有一个RPM,我正在回购。 现在我需要通过木偶安装rpm。 我没有任何依赖于该rpm。 目前我正在使用脚本 package { "application": provider => rpm, source => "http://10.20.51.163/repo/calculator$calculator_version.rpm", install_options => ['-ivh –prefix=/opt/'], ensure => [$calculator_version], } 但我想改变这个代码,并使用提供者作为百胜。 我怎样才能做到这一点 ? 请帮忙

木偶不能在多个ruby版本环境中使用augeas

我试图与augeas傀儡工作,但它抱怨没有augeas提供者。 一些谷歌searchbuild议 sudo yum install augeas augtool ls /files/etc/php.ini # test it works as expected sudo yum install ruby-augeas # this is to "bridge" ruby and augeas ruby -raugeas -e "puts Augeas.open" # Test ruby can talk to augeas /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file — augeas (LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' 一切工作,并安装除了最后一行。 Ruby只是不知道在哪里findaugeas.rb,因为它不在ruby包含path中 [vagrant@SubscriptionsAPI ~]$ […]