Ask Your Question
0

Problem in creating hiera for my module

asked 2017-08-01 21:57:51 -0500

rohithmn03 gravatar image

Hi Team,

aoaagentinstallation/manifests/splunk_install.pp

class aoa_agent_installation::agent_install(String $myowner, String $mygroup, String $myuser, String $myhome) {

Now i want all the 4 variables ( myowner, mygroup, myuser, myhome) to be defined in a single hiera file. All these variables values differs per hosts/servers/nodes.

Now how can i have a single hiera file that my class agent_install.pp should look for variables values for all the attached nodes/servers.

Regards, Rohith

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-08-02 16:33:25 -0500

use Hiera environments for that. Note that $myuser may be something you want passed into Puppet rather than saved in Hiera files. It is often a sensitive element (along with password, certs, and tokens) that is best not to check into your source control repo (especially if it is a public repo).

edit flag offensive delete link more
0

answered 2017-08-02 06:17:02 -0500

CBR gravatar image

You can go through Hiera documentation on how to achieve that.

https://docs.puppet.com/hiera/3.3/dat...

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

1 follower

Stats

Asked: 2017-08-01 21:57:51 -0500

Seen: 38 times

Last updated: Aug 02