• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in Ansible by
Q:
How do you access Shell Environment Variables?

1 Answer

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

Related questions

0 votes
asked Nov 13, 2019 in Ansible by rajeshsharma
0 votes
asked Nov 13, 2019 in Ansible by rajeshsharma
...