Puppet

Puppet:我的配置有什麼問題?

  • August 21, 2018

我想學木偶。在 Suse 上安裝正常。CA 和 SSL 工作正常

puppet cert list --all

歸還我的主人和我的客戶。

在客戶端

puppet agent -t

返回OK,沒問題。

我開始了一個非常簡單的清單,hello world,我想在master和client上申請。

file { '/tmp/hello-world.txt':
       ensure => file,
       content => "hello, world\n",
}

做主

puppet apply manifest.pp

在客戶端

puppet agent -t

在主人我看到 hello world 文件,在客戶端沒有。這是我在主人和客戶端上的 puppet.conf

#master

[master]
vardir = /opt/puppetlabs/server/data/puppetserver
logdir = /var/log/puppetlabs/puppetserver
rundir = /var/run/puppetlabs/puppetserver
pidfile = /var/run/puppetlabs/puppetserver/puppetserver.pid
codedir = /etc/puppetlabs/code
dns_alt_names = suse3.mynet.priv,suse3

[main]
certname = suse3.mynet.priv,suse3
server = suse3.mynet.priv,suse3
environment = production
runinterval = 1h

#Client
[main]
certname = suse2.mynet.priv
server = suse3.mynet.priv
environment = production
runinterval = 1h

找到的解決方案:清單位於錯誤的目錄中。必須在目錄

/etc/puppetlabs/code/environments/production/manifests

引用自:https://unix.stackexchange.com/questions/434441