Login
Remember
Register
Ask a Question
How do you access Shell Environment Variables?
0
votes
asked
Nov 5, 2019
in
Ansible
by
Robin
How do you access Shell Environment Variables?
shell-environment
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Nov 5, 2019
by
rajeshsharma
If you are just looking to access the existing variables then you can use “env” lookup plugin.
For example:
Accessing the value of Home environment variable on management machine:
local_home:”{{lookup(‘env’,’HOME’)}}”
...