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



How can I set the path or any other environment variable for a task or entire playbook?..

Answer / Alpana Vyas

In Ansible, you can set environment variables using the `environment` keyword in your play or task. Here's an example:nn```yamln- hosts: webserversn tasks:n - name: Set an environment variablen ansible.builtin.env: n VAR_NAME: VAR_VALUE

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ansible Interview Questions

When should you test playbooks and roles?

1 Answers  


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

1 Answers  


What are ad-hoc commands?

1 Answers  


What are the ansible modules?

1 Answers  


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

1 Answers  


How do I generate crypted passwords for the user module?

1 Answers  


Explain in detail about ad-hoc command?

1 Answers  


What is ansible task?

1 Answers  


What is ci/cd?

1 Answers  


How can you speed up management inside in ec2?

1 Answers  


What is ansible and what makes it stand out from the rest of the configuration management tools?

1 Answers  


How can you create a lamp stack and deploy a webpage by using ansible?

1 Answers  


Categories