我的基于Ubuntu的kickstart-host几乎可以正常工作,为Ubuntu 10.04(包括i386和amd64)和CentOS 5.6服务于新的(VMware-)主机。 其中一个令我困扰的是Ubuntu 10.04 LTS自带Puppet 0.25.4,但是我想用Mathias Gug的backports中较新的Puppet 2.6.3。 到PPA-repository的链接位于/etc/apt/sources.list.d/中的一个文件中,相应的GPG-key也在apt-key中:两个文件都被成功下载到kickstart的%post部分。 原来的puppet和puppet-common是从ks.cfg中的%packages部分安装的。 到目前为止,我无法在kickstart中自动升级默认的Puppet包到新的包。 apt-get update && apt-get dist-upgrade在第一次重启和login后工作,但是当我在ks.cfg%post部分使用这两个apt-command时,事情开始失败。 所以无论如何, 在kickstart过程中 ,从Ubuntu PPA升级软件包的最佳方式是什么,而不是(手动)呢? 这甚至可能与kickstart /在Ubuntu上? 如果没有(和作为一个可能的select), 鞋匠可以处理这个呢? UPDATE 使用较新的Puppet-packages(2.7.1)在这里find一个Ubuntu PPA: https : //launchpad.net/~aroth/+archive/ppa
在init.pp中,squid服务是这样定义的: service { 'squid': ensure => running, enable => true, hasrestart => true, hasstatus => true, subscribe => File['/etc/squid/squid.conf'], } 结果是这样的: err: /Stage[main]/module_1::Squid/Service[squid]/ensure: change from stopped to running failed: Could not start Service[squid]: Execution of '/etc/init.d/squid start' returned 1: 如果我运行“etc / init.d / squid start”,我得到: Rather than invoking init scripts through /etc/init.d, use the service(8) […]
我正在运行squid-deb-proxy ,我想用Puppet / Augeas来改变configuration。 当我尝试这个: augeas {'squid-deb-proxy.conf': lens => 'Squid.lns', incl => '/etc/squid-deb-proxy/squid-deb-proxy.conf', changes => ["set http_port 3129"], require => Package['squid-deb-proxy'] } 我从Puppet得到以下错误: err: /Stage[main]/Portal::Packages::Squid-deb-proxy/Augeas[squid-deb-proxy.conf]: Could not evaluate: Save failed with return code false 我用augtool尝试了以下augtool : augtool> rm /augeas/load/* rm : /augeas/load/* 867 augtool> set /augeas/load/Squid/lens Squid.lns augtool> set /augeas/load/Squid/incl /etc/squid-deb-proxy/squid-deb-proxy.conf augtool> load augtool> print […]
在我们的设置中,我们使用木偶pipe理我们的服务器。 几天后,我看到傀儡客户运行非常缓慢。 当傀儡的过程中,我得到的负载 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) […]
/etc/puppet/manifests/classes/users.pp class users { define add_user($uname, $comment, $home, $shell, $uid, $gid, $password) { # Create the user. This is where most of the magic happens. user { "$uname": username => $uname, ensure => present, comment => "$comment", home => "$home", shell => "$shell", uid => "$uid", password => "$password", gid => "$gid" } file { […]
我有以下资源: exec{'regen-nagios-hosts': command => '/usr/local/bin/generate-nagios-host-definitions-from-hostfile < /etc/hosts > /etc/nagios3/conf.d/sv-hosts.cfg', user => 'root', before => Class['nagios::server'], notify => Service['nagios3'], require => File['/etc/hosts'], } 理想情况下,我只想在文件改变时重新启动Nagios。 看来我真正想要的是一个文件资源,但文件资源有一个模板或实际的内容,而不是一个脚本。 如何才能生成文件(或更改我的方法),以便/etc/nagios3/conf.d/sv-hosts.cfg更改时重新启动Nagios?
我有一些使用情况,我想定义多个类似的资源,最终将在一个单一的文件(通过模板)。 作为一个例子,我试图写一个puppet模块,让我pipe理MAC地址和networking接口名称之间的映射(从puppet写udev的persistent-net-rules文件),但也有很多其他类似的用例。 我search了一下,发现它可以用新的参数化类语法来完成:如果以这种方式实现,它应该像这样使用: node { "myserver.example.com": class { "network::iftab": interfaces => { "eth0" => { "mac" => "ab:cd:ef:98:76:54" } "eth1" => { "mac" => "98:76:de:ad:be:ef" } } } } 不错,我同意,但是当你pipe理更复杂的东西( 比如在这个模块中的networkingconfiguration,或者其他任何其他多个复杂资源中的单一configuration文件 )时,它会迅速爆炸。 在SF上有一个类似的问题,有人build议使用Pienaar的puppet-concat模块,但我怀疑它可能比参数化的类更好。 在configuration定义中,真正的酷和干净的东西就像包含的主机types一样 ,它的使用简单,漂亮,干净,自然映射到多个资源,最终将被configuration在一个地方。 换成我的例子,它会是这样的: node { "myserver.example.com": interface { "eth0": "mac" => "ab:cd:ef:98:76:54", "foo" => "bar", "asd" => "lol", "eth1": "mac" => "98:76:de:ad:be:ef", […]
我使用SSL设置Puppetdb并遇到证书问题。 我使用Nginx作为Puppet的SSL代理,所以我的CA由这个Nginx代理机器上的mongrel服务器pipe理。 如果我使用Nginx机器上的CA为我的Puppetdb URI生成证书,我可以使用puppetlabs-puppetdb模块(因为Puppet代理使用代理的CA)来设置Puppetdb, puppetlabs-puppetdb无法连接到它,因为它有自己生成的CA证书。 如果我使用其中一个Puppetmasters为Puppetdb URI生成证书,则不能使用puppetlabs-puppetdb模块部署Puppetdb,因为Puppet代理不使用相同的CA证书。 我能做些什么调和这一切? 我可以完全closures我的傀儡(因为SSL由Nginx代理pipe理)的SSL和让他们使用代理的CA连接到Puppetdb?
我有一个主人在我的VPS上运行,它有一个简单的helloworld清单,可以正常使用我的任何Ubuntu机器。 它连接,交换密钥和创buildtesting文件好吧,所以我相信这不是服务器问题。 使用openSUSE在虚拟机上运行的代理程序说: err: Could not request certificate: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed. This is often because the time is out of sync on the server or client 我相信这可能是一个破损或丢失的lib,因为这个软件包的构build不是非常准确 – 例如,由于locking文件的path不正确,它不会开箱即用。 那么我怎么知道这里到底是什么错误呢? 时间是好的,我已经检查过了。 如果可能的话,我可能可以不使用SSL,因为SUSE机器仅用于培训,但这是最后的机会。
使用iptables puppet模块我需要什么语法来允许从本地主机上的端口443到端口8443redirect? 它看起来应该是语法应该是以下,但我不知道如何将其翻译成清单。 iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 –dport 443 -j REDIRECT –to-ports 8443 现有的木偶规则: firewall { '100 tomcat rewrite 443 to 8443': table => 'nat', chain => 'PREROUTING', jump => 'REDIRECT', proto => 'tcp', dport => '443', toports => '8443', } firewall { '100 allow access to tomcat 8443 https': […]