Categories

Nov 13, 2019 in Ansible
Q: How do you set the path or any other environment variable for a task?

1 Answer

Nov 13, 2019
The environment variables can be set by using the 'environment' keyword. It can be set for either a task or an entire playbook. Follow the following code to see how do set the path, such as:

environment:  

PATH: "{{ansible_env.PATH}}:/thingy/bin"  

SOME: value
Click here to read more about Ansible
Click here to read more about Insurance

Related questions

Madanswer
May 17 in Python
Nov 13, 2019 in Ansible
Oct 9 in JAVA
...