Reputation: 2714
I am writing deployment script, it needs to perform based on the system variable. Is there any way to read specific environmental variable through chef recipe ?
Upvotes: 3
Views: 6077
Reputation: 9146
You can use Ruby native way to manage environmental variables (ruby-doc link). Thus you can reference a environmental variable from your recipe directly using ENV['MY_VARIABLE'].
Upvotes: 4