1

Does anyone know how to set a correct path in :hierarchy section of hiera.yaml config to apply configuration to Foreman's host groups? I tried to use this settings with %{::hostgroup} variable, but it didn't work for me: https://github.com/aldavud/hiera-sat6/blob/master/docs/satellite6_hiera.md

Is this specific only to Satellite? Should I use different version(s) of Hiera/Puppet/Foreman? Any idea? :)

We are currently using Hiera 3.3.2, Puppet 4.10.9 and Foreman 1.15.6.

thx

patok
  • 692
  • 1
  • 5
  • 15

1 Answers1

1

I have got a solution...

At first I looked to puppetserver process with strace, and after running puppet agent on managed host I saw this in its output:

[pid  7997] stat("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
[pid  7997] stat("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
[pid  7997] stat("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
[pid  7997] stat("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
[pid  7997] stat("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", {st_mode=S_IFREG|0644, st_size=121, ...}) = 0
[pid  7997] open("/etc/puppetlabs/code/environments/development/hieradata/hostgroup/PROD/ubuntu/rabbitmq.yaml", O_RDONLY) = 37

Then we realized that rabbitmq.yaml is not well written, so after making some changes the host gets its configuration. And that's it.

patok
  • 692
  • 1
  • 5
  • 15