Articles of 木偶

安装hiera-puppet-1.0.0-1.el6.noarch与来自软件包puppet-3.7.1-1.el6.no.06的文件冲突

安装木偶和hiera sudo rpm -ivh http://yum.puppetlabs.com/el/6.4/products/x86_64/puppetlabs-release-6-11.noarch.rpm sudo yum update -y sudo yum -y install vim unzip rubygems puppet puppet-server hiera-puppet git 结果是: Resolving Dependencies –> Running transaction check —> Package hiera-puppet.noarch 0:1.0.0-1.el6 will be installed –> Finished Dependency Resolution Dependencies Resolved ================================================================================= Package Arch Version Repository Size ================================================================================= Installing: hiera-puppet noarch 1.0.0-1.el6 puppetlabs-products 14 k Transaction […]

通过木偶代理控制目录拉

我们刚开始在我们的QA环境中使用Puppet。 一直以来,我都觉得代理只有在代理节点重启木偶,或者只有从命令行初始化的时候,才能从主服务器上取目录。 但昨天,我正在制作一些木偶剧本,并且偶尔会在我们的testing节点上重新启动木偶代理来提取新的目录,但不幸的是,对我而言,其他代理也在拉动testing目录一大堆不良变化)。 没有人在其他节点重新开始傀儡。 我检查了/ var / log /消息,并意识到它从第一天起每30分钟从主节点拉取目录,而不需要重新启动木偶。 我现在有以下问题: 1)当傀儡服务运行在傀儡代理(即守护进程模式)上时,我是否正确地假设它每隔30分钟从主服务器上取下目录,这是预期的行为? 2)我在哪里可以控制每次拉之间的时间间隔? 3)有什么办法可以阻止傀儡服务,只要我愿意,就可以从傀儡大师那里推送目录?

在“木偶”不能正确解决的环境中的木偶CRLs

由于技术层面上面的政治原因,空白的puppet没有解决我们基础设施部分的正确的傀儡大师。 这些地区有自己的独立傀儡大师和CA. 今天我发现…我们在某个地方做了错事。 在其中一个区域的代理机器上运行此命令: puppet certificate_revocation_list find crl –terminus rest 给我一个类似这样的错误: Error: Could not call 'find' on 'certificate_revocation_list': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed: [unable to get certificate CRL for /CN=puppetmaster-wrong.example.com] 当我试图运行木偶代理时,我得到了一个非常相似的: Error: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify […]

使用Puppet apt模块

我是Puppet的绝对初学者,当我尝试通过apt模块安装软件包时遇到了问题。 class newrelic { apt::source { 'newrelic':location => 'http://apt.newrelic.com/debian/', repos => 'non-free', key => '548C16BF', key_source => 'https://download.newrelic.com/548C16BF.gpg', include_src => false, release => 'newrelic', } package { 'newrelic-sysmond':ensure => 'present', notify => Service['newrelic-sysmond'], require => Class['apt::source'], } service { 'newrelic-sysmond':ensure => 'running', enable => true, hasrestart => true, hasstatus => true, require => Exec['newrelic_config'], } […]

依赖关系通过Puppet安装Tomcat7最简单的方法是什么?

我正在尝试构build如下简单的Puppet配方: package { 'openjdk-7-jre-headless' : ensure => installed, } package { 'tomcat7-common' : ensure => installed, } package { 'tomcat7' : ensure => installed, require => Package['tomcat7-common'],} package { 'tomcat7-admin' : ensure => installed, require => Package['tomcat7-common'], } 然而,当运行sudo puppet apply -v tomcat7.pp ,我仍然有这些错误: err:/ stage [main] //包[tomcat7-common] /确保:从purged改变为present失败:执行/ usr / bin / apt-get -q […]

我是否需要为iptables上的传出规则设置源和目标端口的规则?

我正在使用puppetlabs防火墙模块,并且遇到了为简单的Web主机设置iptables的麻烦。 我遵循本指南并希望设置其他规则。 https://sysadmincasts.com/episodes/18-managing-iptables-with-puppet 例如,我已经添加了规则来允许使用git和mysql端口传出stream量: firewall { '200 allow outgoing mysql': chain => 'OUTPUT', state => ['NEW'], proto => 'tcp', dport => '3306', action => 'accept', } firewall { '200 allow outgoing git': chain => 'OUTPUT', state => ['NEW'], dport => '9418', proto => 'tcp', action => 'accept', } 并在iptables看,我可以看到以下规则: root@app01:~/geppetto# iptables -L -n Chain INPUT […]

在Puppet服务器上重复声明

我不能覆盖我的清单中的类的参数。 两台机器上的木偶版本是3.7.5。 我使用thias-postfix 。 我什至不能从Readme.MD文件执行示例。 以下是我的site.pp清单: node default {} node "subscriber" { Exec{path => "/usr/bin:/usr/sbin:/bin:/sbin"} include postfix::server class {'::postfix::server': … } } 在“订户”节点上执行时,我得到以下内容: Error: couldn't retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Class[Postfix::Server] is already declared; cannot redeclare at /etc/puppet/manifests/site.pp: *XX* on node subscriber Warning: Not using cache on failed catalog […]

恢复木偶configuration

任何人都知道,如果你可以从运行代理的主机恢复木偶configuration? 我们find了应用于主机的重新格式化的yaml文件,但没有find实际的木偶代码。 在CFengine中,客户端在其工作目录中创build了一个configuration文件的本地副本,希望puppet在主服务器不可用时做了类似的事情。 举起小学生的错误 – 我们没有备份,这是一个已经工作了几个星期的开发环境。 我们谈到备份,但从来没有执行,然后虚拟机pipe理员无意中删除了客人… 提前致谢

puppet中的资源types无效

我有以下问题: 无效资源typesmsql :: db at /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513/db.pp:6 我的清单(db.pp)是: include mysql::server msql::db { "loja": schema => "loja_schema", password => "lojasecret", } 我定义的types称为mysql :: db在一个名为mysql的模块中。 这个模块有一个init.pp清单文件夹: class mysql { } 还有一个名为db.pp的文件,其中定义的types是: define mysql::db($schema, $user = $title, $password) { #Dependência Class['mysql::server'] -> Mysql::db[$title] exec { "$title-schema": unless => "mysql -uroot $schema", command => "mysqladmin -uroot create $schema", path => […]

refreshonly不与傀儡exec资源工作

我正在使用以下用户资源创build一个unix用户,然后为用户设置一个初始密码。 然后我用chage命令执行一个exec来强制用户在第一次login后更改他的密码。清单如下 node 'node2.example.com','node3.example.com'{ user { 'askar': ensure => 'present', managehome => 'true', comment => 'Laskar Home', home => '/home/askar', shell => '/bin/bash', expiry => '2016-04-22', password => '$1$T7iMiuVY$bVjrtyWV4diXBKlCgcDKT0', password_min_age => '20', password_max_age => '60', } exec { 'chage': path => '/usr/bin/', command => 'chage -d 0 askar', } } 上述情况的问题是,代理每次拉取清单时,密码又被设置为默认密码,然后用户被迫更改密码。 所以,为了避免这种情况,我添加了如下的refreshonly参数 exec { 'chage': […]