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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I loop over a list of hosts in a group, inside of a template?

1


What does fact mean in ansible?

2


How is ansible used in a continuous delivery pipeline? Explain.

1


How do I handle different machines needing different user accounts or ports to log in with?

1


How would you access a variable of the first host in a group?

1


Describe your newsletter ansible and who it’s aimed at.

1


How do I write an ansible handler with multiple tasks?

1


What is the use of ansible?

1


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

2


What is the method to check the inventory vars defined for the host?

1


Can you build your own modules with ansible?

2


What is ansible role?

1


Give a comparison between ansible and puppet.

1


How do I configure a jump host to access servers that I have no direct access to?

1


Write an ansible playbook to automate the starting of ec2 instance.

1