Login
Remember
Register
Ask a Question
How do you access shell environment variables?
0
votes
asked
Oct 7, 2020
in
Ansible
by
Robindeniel
How do you access shell environment variables?
#shell-environment-variables-ansible
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Oct 7, 2020
by
SakshiSharma
1) The existing variables of the controlling machine can be accessed by using the “env” lookup plugin.
2) For example; to get the value of the management machine’s home environment variables, you can enter:
Local_home:”{{lookup(‘env’,’HOME’)}}”
...