Ask Your Question
1

custom environment variables in puppet templates

asked 2014-02-05 01:49:43 -0500

admin gravatar image

updated 2014-02-05 01:50:08 -0500

I want to access custom env variables in puppet templates and i also don't want to use FACTER.

I know if we do

FACTER_variable = 'value'

then we can access it in template but I want to declare env variable as a global env variable like in some bashrc file.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2014-02-05 03:48:20 -0500

nibalizer gravatar image

Do you mean an environment variable on the agent or on master?

Either way, stepping outside Facter on this will be an uphill battle. If you can centralize the data into a yaml file or database, you could use hiera to feed that data into your templates.

Also remember that template evaluation happens on the master.

edit flag offensive delete link more
0

answered 2015-06-23 07:04:04 -0500

To know all things about puppet templateyou can read this official documentation of puppetlabs: https://docs.puppetlabs.com/guides/te....

It briefly describes about accessing custom environment variables and other things. I hope that you will find the exact solution there as per your desire. Good Luck!

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: 2014-02-05 01:49:43 -0500

Seen: 576 times

Last updated: Feb 05 '14