![基本 Puppet 配置不起作用](https://linux22.com/image/795490/%E5%9F%BA%E6%9C%AC%20Puppet%20%E9%85%8D%E7%BD%AE%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我忘了在 site.pp 中放入节点命令,如下所示:
class emacs {
package {
emacs:
ensure => installed
}
}
node default {
include emacs
}
原始问题:
我在工作站上安装了 puppetd 和 puppetmaster。我运行的是 Fedora14、puppetd、puppetmaster 版本 0.25.5。当我运行 puppetmaster 和 puppet 时,我在 /var/log/messages 中收到以下信息:
Apr 20 08:51:31 localhost puppetmasterd[4734]: Reopening log files
Apr 20 08:51:31 localhost puppetmasterd[4734]: Starting Puppet server version 0.25.5
Apr 20 08:51:43 localhost puppetd[4768]: Reopening log files
Apr 20 08:51:43 localhost puppetd[4768]: Starting Puppet client version 0.25.5
Apr 20 08:51:44 localhost puppetmasterd[4734]: Compiled catalog for localhost.localdomain in 0.00 seconds
Apr 20 08:51:44 localhost puppetd[4768]: Finished catalog run in 0.09 seconds
我的 /etc/puppet/manifests/site.pp 是这样的:
class emacs {
package {
emacs:
ensure => installed
}
}
class mc {
package {
mc:
ensure => purged
}
}
我只是进行了简单的配置,只是想看看它是否有效。
/etc/puppet/puppet.conf 是:
[main]
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl
[puppetd]
classfile = $vardir/classes.txt
localconfig = $vardir/localconfig
report = true
/etc/sysconfig/puppet 有:
PUPPET_SERVER=localhost.localdomain
并且 /etc/sysconfig/puppetmaster 有:
PUPPETMASTER_MANIFEST=/etc/puppet/manifests/site.pp
我不明白为什么 puppet 没有安装我配置的软件包。我是不是漏掉了什么?
答案1
您的客户端是否正确解析了 fqdn?运行 dig puppetmaster.domainname.com,您得到了什么结果?
另外,您是否在 puppetmaster 上配置了客户端证书?