Reputation: 49
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.
Upvotes: 1
Views: 1180
Reputation: 49
Ok! I know what was broken :) first missing part in common.yaml:
(...)
classes:
- os
os::version: 'ugabuga'
(...)
second mistake in modules/os/manifests/init.pp:
class os (
$version = 'v0.0.0'
){ (...) }
instead of:
class os {
$version = 'v0.0.0'
(...)
}
and finally, the code should be included in manifests/site.pp like this:
node default {
hiera_include('classes')
include os
}
And that's it! But it wasn't trivial - at least for me. Documentation isn't that specific in that case and there are no complex examples about this.
Upvotes: 1