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
How do I loop over a list of hosts in a group, inside of a template?
What does fact mean in ansible?
How is ansible used in a continuous delivery pipeline? Explain.
How do I handle different machines needing different user accounts or ports to log in with?
How would you access a variable of the first host in a group?
Describe your newsletter ansible and who it’s aimed at.
How do I write an ansible handler with multiple tasks?
What is the use of ansible?
How can looping be done over a list of hosts in a group, inside of a template?
What is the method to check the inventory vars defined for the host?
Can you build your own modules with ansible?
What is ansible role?
Give a comparison between ansible and puppet.
How do I configure a jump host to access servers that I have no direct access to?
Write an ansible playbook to automate the starting of ec2 instance.