Reputation: 2724
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: 6080
Reputation: 9176
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