How can one interpolate variables or dynamic variable names?
Answer Posted / Tara Datt Joshi
Ad-hoc commands in Ansible are one-off tasks that can be run against specific hosts, without the need to write a full playbook. To run an ad-hoc command, use the `ansible` command followed by the host or group and the task you want to execute. Here's an example:nn$ ansible webservers -m ping
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I display all the inventory vars defined for my host?
How to interpolate variables or dynamic variable names?
How do I set the path or any other environment variable for a task?
When should I use {{ }}?
When to use {{}} ? How to interpolate variables or dynamic variable names?
How would you install ansible on a centos system?
What are the different components of ansible?
What are ad-hoc commands?
Give a comparison between ansible and puppet.
How do I speed up management inside ec2?
How would you access a variable of the first host in a group?
List some advantages of using ansible.
How can one interpolate variables or dynamic variable names?
Is there a web interface / rest api / etc?
What’s the use of ansible?