Ask Your Question

How can I force to reload hiera values?

asked 2014-01-02 16:10:24 -0600

cdams gravatar image


In my puppet script, I've got several steps. In one step, I change some values in my hiera.yaml. But I've got an issue, because the hiera values are loaded at the beging of my puppet script, I don't get the updated value...

How can I force the update of hiera values after a specific step in my puppet script?

Thanks in advance

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2014-01-04 09:21:13 -0600

gh gravatar image

Hiera's configuration, hiera.yaml, is not meant to be managed with Puppet. If you are automating the deployment of puppet masters, I would recommend that you keep hiera in a version controlled repository and check that out on your puppet masters as part of their bootstrap process.

edit flag offensive delete link more

answered 2014-01-03 15:21:45 -0600

Red Cricket gravatar image

If you change your hiera.yaml file you will have to restart your puppet master. From link text

Puppet master note: If you modify hiera.yaml between agent runs, you’ll have to restart your puppet master for your changes to take effect.

edit flag offensive delete link more

answered 2014-01-04 03:00:29 -0600

doc75 gravatar image

Just some ideas:

  • ensure that next steps do nothing if the hiera.yaml file is not having the expected values (perhaps not so easy)
  • otherwise, the second run should be OK.

Perhaps it would help to provide you an answer to know why you think you cannot have the hiera.yaml file correctly set at the beginning.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-01-02 16:10:24 -0600

Seen: 2,734 times

Last updated: Jan 04 '14