Ask Your Question

Is putting operating system specific data in Hiera a bad practice?

asked 2016-08-17 10:30:46 -0600

wfsaxton gravatar image

I'm working on architecting Puppet, from scratch, for our data center and trying to keep our Hiera hierarchy to a minimum. One of the things we do with our current home-grown configuration management system is have different settings for different OS levels. For example, if we're running Solaris 10, then "ntp" should be running. If Solaris 11, then "ntp4" should be running. In fact, they both have widely different services to be enabled/disabled.

I'm wondering whether or not this should all be handled within the modules or whether or not its an ok practice to configure this in Hiera. It would be much easier to do it all in Hiera where I could just have an array of expected services enabled/disabled.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-08-19 03:41:06 -0600

masterdam79 gravatar image

I'd personally put operating system specific stuff in Hiera, separating the logic from the variables. Usually I only construct modules which are fed by variables from Hiera making the code in the modules reusable.

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


Asked: 2016-08-17 10:30:46 -0600

Seen: 99 times

Last updated: Aug 19 '16