Articles of 木偶

傀儡class级 – 添加GPT密钥的APT源

我正在使用该模块: https : //github.com/puppetlabs/puppetlabs-apt 我configuration了下面的类来创build一个额外的APT源并添加GPG密钥。 class filebeats_apt { apt::source { 'Filebeats': comment => 'Filebeats', location => 'https://packages.elastic.co/beats/apt', release => 'stable', repos => 'main', key => { 'server' => 'https://packages.elastic.co/GPG-KEY-elasticsearch', 'id' => '30239CC130E1A7FD81A27B140976EAF437D05B5', }, include => { 'src' => true, 'deb' => true, }, } } 我引用我的主要清单中的类如下: # Puppetpal node 'puppetpal' { include filebeats_apt } 我不断收到以下错误: […]

木偶:无法评估:无法从环境生产中检索信息

我在这里看过类似的post,但是没有解决 意图是复制代理节点上的bash脚本并执行。 SLES11SP4-118:~ # cat /etc/puppet/manifests/site.pp node default { include base } node 'sles11sp4-170.dev.insiteone.com' { class {'base':} } class base { exec { "remove yum": command => 'zypper removerepo 1', logoutput => 'true', path => '/usr/bin/' } exec { "add yum": command => 'zypper addrepo -f http://10.156.14.121/repo/RPMS/QA/ QA', logoutput => 'true', path => '/usr/bin/' } […]

缺lesstypes组和用户的Puppet提供程序

我从https://yum.puppet.com/puppet/上的CentOS 7机器上安装了Puppet 5。 安装成功了,我可以运行puppet apply一个像这样的简单清单: file {'/tmp/example-ip': ensure => present, mode => '0644', content => "Here is my Public IP Address: ${ipaddress_eth0}.\n", } 但是,如果我尝试通过Puppet创build一个用户和组,我总是得到以下的erorr消息: Error: Could not find a suitable provider for user Error: Could not find a suitable provider for group 这是产生这些错误的清单: group { 'team-berlin': ensure => present, } group { 'team-london': ensure => […]

使用基于networking(因特网)子网覆盖的正则expression式修改puppet nodes.pp需要同行评审

对于那里的傀儡专家,我正在尝试修改基于node.pp 例如,我想要10.10.10.0到10.10.10.255和192.168.2.0networking的子网获得以下puppet模块。 在我的nodes.pp这个正则expression式工作? node \d(10).(10).[0-10].[0-255] | \d (192).(168).(2).[0] $ { include "ntp" include "dhcp" include "common" } node default { include "common" } ^会在上面工作吗? 谢谢

让模块与对方交谈

我目前正在通过确保服务和用户被禁用来处理configuration文件来locking服务器。 例如,Apache。 当另一个configuration文件想要pipe理资源时,这会产生问题,因为那样我将拥有两个Service [apache]资源。 现在我可以使用类似于define的东西了,但是我的首选方法是profile :: apache可以和profile :: lockdown交谈,并告诉它离开apache。

木偶:事后添加要求参数

我希望能够添加一些需求到我设置的文件: define daemontools::service( $ensure = 'running', $source ){ case $ensure { 'running': { $real_ensure = $source } 'stopped': { $real_ensure = 'absent' } default: { fail("no such ensure for daemontools::service") } } file{"/etc/service/${name}": ensure => $real_ensure, require=> Package['daemontools'] } # This is the part that gets confusing if $require { File["/etc/service/${name}"]{ require +> $require } […]

从一个木偶大师转换到另一个木偶大师

我有一个傀儡主持人,一直在从一个远程木偶大师那里获取数据,现在我想把这个主人变成一个木偶大师。 主机(作为木偶代理)已经被configuration和SSL证书交换。 现在有一个新的傀儡大师(在同一个主持人),我没有任何设置。 我已经configurationpuppet.conf指向新的服务器(同一个主机,但使用DNS名称),但尚未configurationfileserver.conf。 木偶使用乘客和阿帕奇。 系统是Ubuntu Lucid Lynx与Puppet 2.6.3并且试图启动傀儡大师给这个反应: # service puppetmaster start * Starting puppet master Could not prepare for execution: Retrieved certificate does not match private key; please remove certificate from server and regenerate it with the current key …fail! 来自包裹的木偶乘客的configuration给出了这个错误: # dpkg –configure puppetmaster-passenger Setting up puppetmaster-passenger (2.6.3-0ubuntu1~lucid1) … Module ssl already […]

木偶:安装两个包之一,如果都没有安装 – 否则没有

使用Puppet … 我有一个NTP的情况,我想要安装ntpd如果没有安装NTP,但只有在既没有安装openntp也没有安装ntpd。 (我通过使用Alexandrian解决scheme解决了这个问题:我摆脱了openntp …) 这超出了ensure => absent并ensure => present ; 你怎么去设置这个呢? 怎么样的依赖? 考虑到这一点,这意味着NTPd只在OpenNTP丢失的情况下安装。 但是,这并不意味着(在上下文中)OpenNTPd 必须丢失… audit选项是否适合在这里?

木偶节点不能find主,ec2公共与内部IP地址和主机文件

如果我设置我的主机文件,使他们参考所有其他ec2节点使用内部IP地址,这将工作,还是我必须使用外部IP地址? 我是否需要在安全组中指定任何内容才能使内部IP地址正常工作? 例如/ etc / hosts ip-10-11-12-13.internal some_node_name 如果我这样做,我可以在脚本中的任何地方引用some_node_name,我以前会使用ip地址吗? 在我的木偶代理服务器上,我有一个像我的木偶大师的参考: public-ip-here puppet 当我重启我的木偶代理时,系统日志显示他们找不到主人的消息:getaddinfo:name or service not known 我确实通过更新/etc/default/puppet 我添加到选项: –server=public-ip-here 从我读的,木偶会默认尝试使用“傀儡”,我把它放在我的主机文件中,那为什么不把它捡起来呢?

使用hiera数据源的puppet主机资源

我试图实现使用hiera作为数据源的puppet /etc/hosts处理,但是我当前的实现需要重复数据,因为我只能将string数组作为$name传递给主机资源。 有没有办法避免这种数据重复? 或者也许有可能使用模板,但保持对/etc/hosts文件进行本地修改的能力? class hosts ($hosts = hiera("hosts"), $hostsdefs = hiera("hostsdefs")) { define hostentry( ) { host{ $name: ip => $hostsdefs[$name][ipaddress], host_aliases => $hostsdefs[$name][host_aliases] } } hostentry{ $hosts: } } 用于hiera的YAML数据: —- hosts: – host1.example.com – host2.example.com hostsdefs: host1.example.com: ipaddress: 10.0.0.1 host_aliases: host1 host2.example.com: ipaddress: 10.0.0.2 host_aliases: host2