1

I'm trying to figure out masterless environment with puppet. I'm using this link to install the newest version of Puppet on Ubuntu.

I'm using this repository https://github.com/szymonrychu/puppet-masterless and running the script: modules/os/files/puppet.sh.

It downloads current Puppet repository to the /opt/puppet directory and then runs the code specified in it. (It sets cronjob pointing to the script, so it will run every hour)

After first run the hiera env is prepared (hiera.yaml) and deployed. From that point the code should start connect to hiera database, but it's not happening.

Most probably there is an issue in modules/os/files/hiera.yaml or in manifests/site.pp, but after several days of struggling I can't get it to work.

4

1 回答 1

1

好的!我知道出了什么问题:) common.yaml中的第一个缺失部分:

(...)
classes:
 - os
os::version: 'ugabuga'
(...)

modules/os/manifests/init.pp中的第二个错误:

class os (
  $version = 'v0.0.0'
){ (...) }

代替:

class os {
$version = 'v0.0.0'
(...)
}

最后,代码应该像这样包含在manifests/site.pp中:

node default {
  hiera_include('classes')
  include os
}

就是这样!但这并不是微不足道的——至少对我来说。在这种情况下,文档并不是那么具体,并且没有关于此的复杂示例。

于 2015-04-21T05:29:55.333 回答