How do I access shell environment variables using Ansible Playbook

0 votes
How do I access shell environment variables using Ansible Playbook?
Jan 30 in Ansible by Tina
137 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey @Tina, If you need to access existing variables on the controller, use the env lookup plugin.

If you need to set env variable for task execution, then edit modules and templates according to your OS and requirements. there is no direct way to achieve this. 

answered Jan 30 by Mahir

Related Questions In Ansible

0 votes
1 answer

How do I access environment variables in Ansible?

Yes @Nagray, you're right! You can access ...READ MORE

answered Jan 24 in Ansible by Tessie
315 views
0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 6,560 points
319 views
0 votes
2 answers

How do i install Ansible using virtualenv

Adding to @Mohit's answer,  For CentOS and RHEL: sudo ...READ MORE

answered Jan 10 in Ansible by Dikinson
62 views
0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

answered Jan 30 in Ansible by Mahir
117 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do i get Ansible predefined variables?

There three types of variables variables gathered from ...READ MORE

answered Jan 24 in Ansible by Parth
60 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.