Ask Your Question
0

How to access the windows environment variable in puppet file?

asked 2017-10-23 13:23:15 -0600

keya gravatar image

I am using setx to set the windows environment variable. How can I access that environment variable in my puppet file?

edit retag flag offensive close merge delete

Comments

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-25 04:01:05 -0600

David Schmitt gravatar image

The puppet code is compiled on the server and doesn't have access to environment variables on the target system.

If you want to transport information from the agent to the master, you need to pull it into a custom fact.

If you already know the value you are putting into the environment variable, another (possibly better solution) is to use the source of the information to drive your puppet code.

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

Stats

Asked: 2017-10-23 13:23:15 -0600

Seen: 18 times

Last updated: Oct 25