Ask Your Question
0

hiera lookup elsewhere in a repository

asked 2018-05-15 03:08:06 -0600

gilbo gravatar image

Hello

I want to create a separate git repository for a version controlled flat text file which stores simple data and have a puppet manifest lookup data directly in there and do something with it. We do use hiera but I want to bypass that so that every feature branch we have looks at one source of truth for this particular job,

Can anyone suggest a way to do this?

Cheers

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-23 09:55:24 -0600

jpsheffield gravatar image

I'm not sure it is sensible (or that I fully understand the question), but I think you could use module data for this, as I believe it does work across modules.

Create a new module (common_data_mod) which just contains a blank manifest/init.pp plus data/common.yaml and hiera.yaml files. Then your lookups would be something like: lookup( "common_data_mod::param_name") https://docs.puppet.com/puppet/4.5/lo...

You'd have to include the module in your site.pp though

I would never do this personally though, but you seem to be suggesting a one off "particular job" of some kind, so maybe you're willing to bend reality a bit.

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: 2018-05-15 03:08:06 -0600

Seen: 621 times

Last updated: May 15