Get environment variables

asked 2016-07-21 07:35:00 -0500

mcorrea gravatar image

Hi everyone! I'm very new at puppet's world and I have a doubt, can I get an environment variable from puppet client to use in my manifest file?

Something like that:

myclass.pp:

class myclass {

$env_var = env['PATH']

if $env_var == "" { # do something }

}

edit retag flag offensive close merge delete

Comments

Facter should already expose core environment variables. See https://docs.puppet.com/facter/3.3/core_facts.html

maynero gravatar imagemaynero ( 2016-07-25 13:17:11 -0500 )edit