Articles of 傀儡

如何从apt.puppetlabs.com安装puppet devel?

根据apt.puppetlabs.com上的自述 文件 ,回购被添加 wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb dpkg -i puppetlabs-release-precise.deb 但我只能看到稳定的2.7版本,当我后来searchaptitude 。 即使我安装release-unstable ,我仍然只能看到2.7版本。 发行版本列在软件包文件中。 Package: puppet Version: 3.0.0-0.1rc3puppetlabs1 Architecture: all Maintainer: Puppet Labs <[email protected]> Installed-Size: 492 Depends: puppet-common (= 3.0.0-0.1rc3puppetlabs1), ruby1.8 Recommends: rdoc Suggests: puppet-el, vim-puppet Section: admin Priority: optional 所以我想这是可能的? 题 如何从apt.puppetlabs.com在Ubuntu 12.04上安装puppet 3.0 rc3?

使用Hiera在Puppet中configurationpuppetdb模块

我正在尝试安装PuppetDB模块 。 其中的一部分捆绑了一个模块,用于安装我正在使用的一些必需的Postgres实例。 我们主要使用heira来configurationangular色并设置各种属性。 如果我添加,我的configuration足够长 roles: – role::postgresql_puppetdb 到主机名hiera yaml文件,它会被拿起,并得到一个基本的postgres实例推出。 我坚持要获取特定的postgresql.confvariables集。 例如,我试过了 roles: – role::postgresql_puppetdb – wal_level: hot_standby 然而,这被推到后续的代理运行。 我希望有人可能会尝试通过这种方式来模拟PuppetDBconfiguration,并指出我做错了什么。

木偶:类已经宣布

我目前正在将我的傀儡代码的结构重组为模型,该模型使用configuration文件和angular色。 我已经开始使用configuration文件,正在testing,但已经遇到问题:/ 在我的节点定义中,我执行以下操作: 节点'dev.server'{ include profile :: php } #modules / profiles / manifests / php.pp class profile :: php { 包括apache :: mod :: php class {'php':} php :: module {“mcrypt”:} php :: module {“mysql”:} php :: module {“gd”:} } 当我在节点上运行puppet代理时,出现错误 错误:无法从远程服务器检索目录:SERVER上的错误400:重复声明:类[Profile :: Php]已经声明; 无法在节点上的/etc/puppet/environments/production/modules/profile/manifests/php.pp:5重新声明 但是,当我将configuration文件重命名为configuration文件:: php2它的工作。 什么原因导致它已经被宣布的问题?

为使用puppet的用户pipe理〜/ .ssh / config?

如何使用Puppet中的ERB模板文件调整〜/ .ssh / config文件中的“用户”行,使其包含与帐户名称匹配的正确用户名? class accounts_global::tharold { account { 'tharold': ensure => present, } file { "/home/tharold/.ssh/config" : require => Account['tharold'], owner => 'tharold', group => 'tharold', mode => '0600', content => template('accounts_global/user_ssh_config.erb'), } } user_ssh_config.erb文件的内容如下所示: Host ssh.example.com Port 22 User tharold IdentityFile ~/.ssh/ssh-key 问题是,<%= something =%>应该怎样用模板文件中的“User tharold”replace用户的账户名? 这个ERBconfiguration文件将被用于多个用户,所以我需要参数化文件的这一部分。 尝试使用<%= @name%>最终将“accounts_global :: tharold”放在文件中。

在Windows系统上,我应该在哪里放置gemrc文件,以便Puppet可以find它?

运行木偶企业3.7 。 代理机器是Windows 2012 Server R2机器。 问题:我在哪里放置gemrc文件,以便Puppet的内部ruby可以find它? 在Linux上,放置文件的地方似乎是/ opt / puppet / etc / gemrc 。 目标 :指导puppet不要在rubygems.org上查看Gem,而是看看我们的内部Gemserver。

文件复制失败使用Puppet文件资源

我正在尝试使用文件资源复制文件。 我的代码如下: node 'Node-002' { file { "/root/helloworld.txt": ensure => file, owner => "root", group => "root", mode => "0644", source => "puppet://modules/templates/${fqdn}/hosts.erb", } } 但是由于以下错误而失败 Error: /Stage[main]/Main/Node[Node-002]/File[/root/helloworld.txt]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/templates/Node-002.example.com/hosts.erb 模板位置如下所示: ls -l /apps/wps/puppetlabs/code/environments/production/modules/templates/Node-002.example.com/hosts.erb -rw-r–r– 1 puppet puppet 462 Jul 20 02:13 /apps/wps/puppetlabs/code/environments/production/modules/templates/Node-002.wiley.com/hosts.erb 即使我在source参数中给出了完整的path,也会出现相同的错误。 我正在使用木偶4.5.4 […]

使用Puppet从多个类向文件增量添加行

我正在尝试使用Puppet来自动configurationSplunk监控。 这涉及将文件path列表添加到Splunkconfiguration文件(inputs.conf)。 我们应用程序中的每个angular色(networking服务器,数据库等)都有自己的Puppet模块,其中包含了所有angular色共有的一些基本模块。 受监控的文件在不同angular色之间会有所不同 – 对于我们要监控的/var/log/nginx/error.log的Web服务器。 对于db服务器,/ var / log / postgresql / postgresql.log。 应该为每个angular色监视一些文件(/ var / log / syslog)。 我使用EBR模板填充inputs.conf文件,例如: # $files is actually a parameter to the logging class $files = ['/var/log/syslog', '/var/log/nginx/error.log'] file {"/opt/splunkforwarder/etc/apps/search/local/inputs.conf": ensure => "present", content => template("logging/splunk_inputs.conf.erb"), require => Package["splunkforwarder"], } # splunk_inputs.conf.erb: <% files.each do |file| %> [monitor://<%= […]

木偶散列创build文件

所以我在app1的傀儡清单中有这个散列 $applicaton = 'app1' daemontools::build { $application: path => "/opt/supervise/${application}" envvars => { 'ENVIRONMENT' => $location, 'SERVICE_USER' => $application_user, 'SERVICE_PORT' => $gunicorn_port, 'SERVICE_IP' => $gunicorn_ip, 'ADDITIONAL_PARAMS' => "–workers $processorcount", 'DJANGO_SETTINGS_MODULE' => "${application}.settings", } } 这个散列在我的app2的傀儡清单中 $applicaton = 'app2' daemontools::build { $application: path => "/opt/supervise/${application}" envvars => { 'ENVIRONMENT' => $location, 'SERVICE_USER' => $application_user, 'SERVICE_PORT' => […]

傀儡执行命令与variables未执行

我有一个非常简单的Puppet(子)模块,应该使用Git从远程位置克隆一个存储库: class wppuppet::git( $location = '/var/www/wp' ) { file { $location: ensure => 'directory', mode => '0755', } exec { 'git-wp': command => 'git clone https://github.com/WordPress/WordPress ${location}', require => Package['git'], } Package['git'] -> File[ $location ] -> Exec['git-wp'] } 出于某种原因,它经常失败,出现以下错误: Error: git clone https://github.com/WordPress/WordPress ${location} returned 128 instead of one of [0] Error: /Stage[main]/Wppuppet::Git/Exec[git-wp]/returns: change […]

Foreman-Installer更改证书

希望在我的环境中安装Foreman进行木偶部署。 我首先运行了foreman-installer,默认情况下,并不关心SSL证书和URL为server01.example.com 我更喜欢它使用像puppet.example.com更具描述性和默认的木偶代理设置。 它应该使未来的工头/傀儡更容易,能够复制证书目录和更改cnamelogging。 我知道我可以使用foreman-install -i以交互方式更改所有设置,但以这种方式更改logging会导致文档不佳。 我试图find正确的选项,以这种方式我想要的方式,但它不工作。 这里是我正在使用的命令和选项: sudo foreman-installer –foreman-foreman-url=https://puppet.example.com:8443 \ –foreman-proxy-registered-name=puppet.example.com \ –puppet-server-foreman-ssl-key=/var/lib/puppet/ssl/private_keys/puppet.example.com.pem \ –foreman-proxy-ssl-cert=/var/lib/puppet/ssl/certs/puppet.example.com.pem \ –foreman-proxy-foreman-base-url=https://puppet.example.com \ –foreman-proxy-ssl-cert=/var/lib/puppet/ssl/certs/puppet.example.com.pem \ –foreman-proxy-ssl-key=/var/lib/puppet/ssl/private_keys/puppet.example.com.pem \ –puppet-server-foreman-url=https://puppet.example.com \ –foreman-proxy-registered-proxy-url=https://puppet.example.com:8443` 运行该命令后,它尝试启动foreman-proxy服务并失败。 它正在寻找名为/var/lib/puppet/ssl/private_keys/puppet.example.com.pem的私钥,但是存在的密钥是/var/lib/puppet/ssl/private_keys/server01.example.com.pem 。 它仍然使用FQDN来创build证书。 我怎样才能以我想要的方式获得这个设置?