I have the following (simplified) play:
- hosts: testing
roles:
- nginx
vars_files:
- config.yml
environment:
http_proxy: http://proxy.example.com:8080
So now, when I run my code, I can read process.env.http_proxy
. I would however like to be able to set other environment variables dynamically under environment
. For example, in my config.yml
I have the following:
application_variables:
- key: "NODE_ENV"
value: "production"
- key: "PORT"
value: "3000"
How would I get the values from application_variables to be dynamically created under environment? I’ve tried a few different solutions I found out there to no avail.
Thanks in advance