Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do I set the path or any other environment variable for a task?



How do I set the path or any other environment variable for a task?..

Answer / Km Poonam Rani

To set an environment variable during an Ansible task, you can use the `environment` keyword. Here's an example:nn```yamlntasks:n - name: Set an environment variablen env:n MY_VARIABLE=valuen command: some_command

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ansible Interview Questions

How to access a variable of the first host in a group?

1 Answers  


How to interpolate variables or dynamic variable names?

1 Answers  


What is ansible tower?

1 Answers  


Can you copy files recursively onto a target host? If yes, how?

1 Answers  


What are ad-hoc commands? Give an example.

1 Answers  


How do I access a variable of the first host in a group?

1 Answers  


What is configuration management and how does it help an organization?

1 Answers  


How can one generate encrypted passwords for the user module?

1 Answers  


How can looping be done over a list of hosts in a group, inside of a template?

1 Answers  


How do I submit a change to the documentation?

1 Answers  


Compare ansible vs puppet?

1 Answers  


What are ansible server requirements?

1 Answers  


Categories