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

What is ansible tower?

1 Answers  


Write a playbook to create a backup of a file in the remote servers before copy.

1 Answers  


How can you access a list of ansible_variables?

1 Answers  


Why is ‘{{ }}’ notation used? And how can one interpolate variables or dynamic variable names?

0 Answers  


How to create encrypted files using ansible?

1 Answers  


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

1 Answers  


How can you connect other devices within ansible?

1 Answers  


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

1 Answers  


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

1 Answers  


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

1 Answers  


When should I use {{ }}?

1 Answers  


Enlist the differences between variable name and environment variables.

1 Answers  


Categories