我是系统pipe理新手。 在Ubuntu上通过puppet安装nginx后,我得到以下输出: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied) [warn] 1898#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 [emerg] 1898#0: open() "/var/log/nginx/access.log" failed (13: Permission denied) 我如何摆脱所有这些消息? 我不想直接使用命令行(chown / chmod),并在每次创build新服务器时重复使用。 因此,我想到了什么必须join到木偶清单。 在这种情况下,最好的系统pipe理员练习是什么:更改/ var / log / nginx的所有者/权限或将日志存储在不同的位置? 如果chown / […]
如果我在资源中指定镜头和incl,augeas插入命令会引发错误。 我还没有真正find有类似问题的人。 当我包含下面的资源时,它会引发无用的错误 $file = "/etc/ldap.conf" $comment_style = "#comment" $lens = "Spacevars.lns" augeas { "${file}": context => "/files${file}", changes => [ "ins ${comment_style} before '*[1]'", "set ${comment_style}[1] 'Puppet has modified this file with augeas'", ], incl => "/files${file}", lens => $lens, } 我已经尝试了augtool中的等价物: # augtool –noload –noautoload augtool> set /augeas/load/Spacevars/lens "Spacevars.lns" augtool> set /augeas/load/Spacevars/incl "/etc/ldap.conf" […]
我以为Puppet是用Ruby编写的,所以我不确定为什么puppetmaster服务不能在Windows下运行。 有没有人有一个想法,为什么? 请注意,我试图找出是否有技术原因。
请帮我解决一个我正面临的问题,我试图用puppet脚本安装adobe CQ5(作者/发布模式)。 我已经定义了instance.pp作为定义的types和传递(作者,发布)清单文件中的参数。 但是我得到下面提到的错误 "Duplicate declaration: Exec[] is already declared in file /tmp/vagrant-puppet/modules-0/cq/manifests/instance.pp:55; cannot redeclare at /tmp/vagrant-puppet/modules-0/cq/manifests/instance.pp:62 on node localhost.123.176.37.38" 这是我的傀儡脚本example.pp define cq::instance ( $installation_type, $servername = $name, $sling_run_modes = "author,dev", $data_dir = "/home/vagrant/$name", $install_path = "/home/vagrant/{$name}/cq5", $min_heap = '256', $max_heap = '1024', $perm_gen = '300', $cq_jar = "cq-author-4502.jar", $port_author = "4502", $port_publish = "4503",) […]
在工头,有能力为主持人设置评论。 我想把这个评论传给一个分配给这些主机的傀儡类,以便这个评论可以打印在主机的motd中。 有什么方法可以将工头的意见传递给木偶?
当我作为根在我的puppetmaster服务器运行以下 puppet master –verbose –no-daemonize 它生成的SSL证书,但添加到他们的域。 哪个是我公司的领域(我在办公室): … Info: Creating a new SSL key for puppetmaster.company_domain.net Info: csr_attributes file loading from /etc/puppet/csr_attributes.yaml Info: Creating a new SSL certificate request for puppetmaster.company_domain.net … 事实上,当我运行代理(centOS和Ubuntu)的等价物时, 这可能与傀儡毫无关系。 但是我对linux,puppet以及所涉及的所有东西没有太多的经验,所以我很想find原因(找不到它,可能是因为我不知道从哪里开始) 谢谢,
我们正在将我们的木偶代码从3.5.7迁移到4.5.2 在申请清单时,我收到以下错误 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 /apps/wps/puppetlabs/code/environments/production/manifests/classes/subversion.pp:17 主要代码如下: node 'Node-002' { include user_default include standard include subversion # include java include sybase # include eclipse # include oxygen […]
CentOS 5.5 我在重新启动mcollective时mcollective了这个问题: # service mcollective restart Shutting down mcollective: Starting mcollective: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load — stomp (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/lib/ruby/site_ruby/1.8/mcollective.rb:2 from /usr/sbin/mcollectived:3:in `require' from /usr/sbin/mcollectived:3 [FAILED] STOMP协议Ruby库已经安装: # gem list stomp *** LOCAL GEMS *** stomp (1.2.2, 1.1.8) 我在RubyGems环境下运行ruby 1.8.7: # ruby -v ruby 1.8.7 (2008-05-31 patchlevel 0) […]
我试图find一个简单而优雅的方式,让傀儡识别它在EC2中使用的节点types。 为了简单起见,假设我有3种节点types:web,api和db。 现在,最简单的方法是使puppet清单中的节点名称等于Amazon给它们的随机主机名,例如: node 'domU-12-12-12-12-12-AB' inherits 'common' { #you're a web instance } node 'domU-13-13-13-13-13-AC' inherits 'common' { #you're an api instance } node 'domU-14-14-14-14-14-AD' inherits 'common' { #you're a db instance } 但是,每当你添加或closures一个实例及其自然的主机名改变时,就会有节点重命名的情况。 另一个缺点是主机名更改,所以傀儡节点清单将不得不每次修补。 你经常听到的一条路线是编辑/ etc / hosts和/ etc / hostname到“web1”,然后在puppet节点语句中使用正则expression式。 问题是私有IP再一次变化,因此你需要更新/ etc / hosts,所以这是一个很头痛的问题。 您现在还需要将真正的亚马逊给定的主机名映射到您刚刚提供给实例的主机名,这是另一个令人头痛的问题。 我读了cloud-init是解决这个问题的方法,但是我还没有玩得太多。 我正在努力避免额外的开销/步骤,可能是脆弱和破裂,所以我正在寻找一个解决scheme,上面这首先是简单的。 你会推荐什么?
我想知道如何解决下面的木偶问题:我想创build几个基于string数组的文件。 复杂的是我想用这些文件创build多个目录: dir1/ fileA fileB dir2/ fileA fileB fileC 问题是文件资源标题必须是唯一的。 因此,如果我将文件名保存在一个数组中,我需要以自定义的方式遍历数组,以便能够使用目录名称来后缀文件名: $file_names = ['fileA', 'fileB'] $file_names_2 = [$file_names, 'fileC'] file {'dir1': ensure => directory } file {'dir2': ensure => directory } file { $file_names: path = 'dir1', ensure =>present, } file { $file_names_2: path = 'dir2', ensure =>present, } 这不会工作,因为文件资源标题冲突。 所以我需要附加例如目录名称的文件标题,但是,这将导致文件数组被连接,不被视为多个文件… arghh .. file { […]