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 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


Please Help Members By Posting Answers For Below Questions

How can I display all the inventory vars defined for my host?

3


How to interpolate variables or dynamic variable names?

3


How do I set the path or any other environment variable for a task?

3


When should I use {{ }}?

2


When to use {{}} ? How to interpolate variables or dynamic variable names?

4


How would you install ansible on a centos system?

3


What are the different components of ansible?

3


What are ad-hoc commands?

3


Give a comparison between ansible and puppet.

3


How do I speed up management inside ec2?

3


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

3


List some advantages of using ansible.

3


How can one interpolate variables or dynamic variable names?

3


Is there a web interface / rest api / etc?

3


What’s the use of ansible?

3