Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How do you access Shell Environment Variables?
Home
Ansible
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’)}}”
...