0 votes
in Ansible by
How do you access shell environment variables?

1 Answer

0 votes
by
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’)}}”

Related questions

0 votes
asked Feb 17, 2020 in Ansible by MBarbieri
0 votes
asked Nov 29, 2023 in Linux by JackTerrance
...