How to read environment variable in a chef's recipe
I am writing a deployment script, it should be executed based on a system variable. Is there a way to read a specific environment variable through a chef's recipe?
+3
mbdvg
source
to share
1 answer
You can use Ruby's own way to manage environment variables ( ruby-doc link ). Thus, you can refer to an environment variable from your recipe directly using ENV ['MY_VARIABLE'].
+3
Javier cortejoso
source
to share