Puppet looking for hiera.yaml in the wrong place

I want the puppet to look for hiera.yaml in / etc, but she will look for her in / etc / puppet. I put a line in puppet.conf:

hiera_config = /etc/hiera.yaml 

But still gives me a warning about updating hiera.yaml when I run the script.

I am running a script from Vagrant 1.2.2. Using puppets 3.2.2

I am running Centos 6.4 on vm.

+4
source share
3 answers

Hmmm ... In Vagrant 1.2.2 and Puppet 3.2.3, I can set hiera_config to puppet.conf without any problems. I would double check that you are editing /etc/puppet.conf on Vagrant vm and not on the main machine, and that the hiera_config line is the [main] block, not just the [master] block.

If both of these conditions are true and still not working, you can try explicitly setting hiera_config in your Vagrantfile:

 config.vm.provision :puppet do |puppet| ... puppet.options = '--hiera_config=/etc/hiera.yaml' end 

Good luck

+2
source

I found that the hiera_config_path puppet assistant now supports hiera_config_path , which does exactly what you need.

 config.vm.provision :puppet do |puppet| # path on host machine to hiera.yaml puppet.hiera_config_path = '/Users/me/vms/hiera/hiera.yaml' # This sets the relative path for hiera data directories puppet.working_directory = '/Users/me/vms/hiera' end 

This is described in Vagrant: Up and Running , but I did not find it until I started looking for a source of vagrants to implement this function myself.

+8
source

The Puppet submission is done as the root user, not roaming, so why doesn't he accept your puppet in / vagrant.

If you run puppet config print inside vm from the user vagrant and root, you will see ALL puppet configuration settings for each user and compare.

+1
source

Source: https://habr.com/ru/post/1494370/


All Articles