Articles of 木偶

无效的包供应商“梨”

我正在创build一个清单,在CentOS 6机器上安装LAMP。 一切工作除了安装一些梨模块。 当发布puppet /etc/puppet/modules/webserver/manifests/init.pp我得到以下内容: /etc/puppet/modules/webserver/manifests/init.pp:111无效的软件包提供程序“pear” 这里是清单的相关部分,包括底部的包含顺序: class php { package {'php': ensure => present, before => File['/etc/php.ini'], } file {'/etc/php.ini': ensure => file, } $packagelist = [ "php-cli", "php-common", "php-devel", "php-gd", "php-ldap", "php-mbstring", "php-mssql", "php-mysql", "php-pear", "php-pecl-ssh2", "php-xml" ] package { $packagelist: ensure => installed, require => Package['php'], notify => Service['httpd'], } class pear […]

自动化Unbreakable Linuxnetworking(ULN)注册

要将RHEL 6.4机器注册到Unbreakable Linuxnetworking(ULN),需要启动uln_register命令。 此命令将打开一个文本界面,用户必须inputULN凭证并select软件包。 一旦注册过程终止,就有可能运行yum update 。 我想自动注册过程(理想情况下通过Puppet,但其他方式也可以)但似乎uln_register只能作为文本graphics界面。 有任何想法吗? 谢谢!

像傀儡节点的doxygen

我的傀儡节点里有一个相当深的inheritance树。 在我参加omnigraffle之前,有没有像Doxygen这样的工具可以用来绘制这个inheritance树的傀儡脚本?

找不到类pe_mcollective

我正在迁移到木偶企业。 已经推进了一些问题,但现在在代理运行中面临这个恼人的问题 … Could not find class pe_mcollective … 首先,我甚至没有使用MCollective(至less现在还没有)。 有什么办法可以暂时禁用“需要”吗? 我没有看到任何明确的在puppet.conf启用它。 我跑了locate并迅速find一个文件/opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp它定义pe_mcollective 。 所以看起来代码是在框中,但在代理运行期间没有find。 任何想法,我怎么能把木偶“企业”指向正确的方向呢?

如何在实例上configuration虚拟主机?

我创build了一个适合于Web服务器的puppet类的主机types,并成功地构build了一个服务器。 但是,我看不到如何在该服务器上configuration虚拟主机(不需要实际编辑服务器本身的Apache2configuration)。 任何人都可以指向正确的方向吗?

具有forman和puppet的exec资源的默认path

我正在使用工头(1.4)和木偶(3.4.3)。 我刚刚在4周前开始使用福尔曼和木偶,所以我是新的。 我想要做的是为exec资源设置一个默认path。 根据许多howtos这不是一个问题,如果你使用Puppet没有工头,因为你可以把它放在你的site.pp 我的site.pp如下: # Empty site.pp required (puppet #15106, foreman #1708) 我已经尝试了一些东西,如把它放在课堂上 将该类包含在我使用的任何类中,并使用exec资源 将课程包含在最上面的主机组中 将该类包含在主机中(显式) 没有工作。 有用的是把定义放在我想使用某些exec资源的类中,但是这基本上与为每个exec定义path相同。 此外,这也适用于文件资源,它应该有一个默认的忽略,如ignore => '.svn' 所以我的问题是,有没有办法像Foreman一样做这样的事情? 我很想用Foreman和Puppet“按原样”来解决这个问题。

当创build非目录/普通文件时,Puppet为文件资源recursion属性

如果我想要: file { '/var/shennanigans/happy-hour.drunk': ensure => present, mode => 700, owner => shamus } 我可以使用recurse => true来确保shennanigans目录是否存在,或者是否需要使用ensure =>目录创build单独的资源?

木偶文件链接不会在Windows下创build目标

file {'VaultUsersLink': path => "C:/VaultWorkspace/VaultUsers.lnk", require => File['VaultWorkspace'], ensure => link, target => "C:/ProgramData/PuppetLabs/facter/facts.d/inventorusers.txt", owner => 'SYSTEM', group => 'Users', mode => 0776, } 似乎它应该做一个快捷方式,它确实使一个名为VaultUsers.lnk的0字节文件,但不填写目标。 我错过了什么吗?

Puppetvariables,默认值,合并和模板

在编写模块的任务中,我发现我有大量的可configuration部分。 为了更好地组织模块(为了读和维护),我select了分割模板文件 。 由于这些模板部分/片段已经总结了一组可configuration的variables,我认为使用代表模板片段内容的散列可能会很方便 (hash) $db -> template( config.db.erb ) (hash) $*** -> template( config.***.erb ) 出于某种原因,我设置了Puppet / Ruby foo出了问题,因为只有抛出的哈希值被使用,剩下的都是undef 。 # Calling the module class { 'wppuppet': location => '/var/www/wp', db => { prefix => 'foo', user => 'usr', pass => '^[:D', }, } 实际的init类inheritanceparams的defaults类 # init.pp class wppuppet( $location = $wppuppet::params::location, $db = […]

用puppet在centos上安装php 5.5

我正在尝试在centos 6.5 x64框上获取更新版本的php和mysql。 我添加了yum repos epel和remi,并将remi作为php的依赖项,但不会安装。 我得到的Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install php' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository epel. Please verify its path and try again是Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install php' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository […]