• 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 set the path or any other environment variable for a task?

1 Answer

0 votes
by
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

Related questions

0 votes
asked Nov 28 in Azure by rajeshsharma
0 votes
asked Oct 7, 2020 in Ansible by Robindeniel
...