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


Explain what are playbooks in ansible? Explain with some examples.



Explain what are playbooks in ansible? Explain with some examples...

Answer / Arjun Dwivedi

Playbooks in Ansible are YAML files containing a series of tasks, plays, and handlers that define the desired state of a system or an application. Playbooks are used to automate system administration tasks by specifying the steps required to configure or manage hosts. Here's a simple example of an Ansible playbook:nn```yamln- name: Example playbookn hosts: allnn tasks:n - name: Print hello worldn ansible.builtin.debug: msg='Hello World!'nn handlers:n - name: Restart servicen ansible.builtin.service: name=my_service state=restarted

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ansible Interview Questions

How do I access a variable of the first host in a group?

1 Answers  


How do I handle python pathing not having a python 2.x in /usr/bin/python on a remote machine?

1 Answers  


What is the use of ansible vaults?

1 Answers  


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

1 Answers  


What are the advantages of ansible?

1 Answers  


How do I access a variable name programmatically?

0 Answers  


Describe your newsletter ansible and who it’s aimed at.

1 Answers  


What is ansible task?

1 Answers  


What are playbooks in ansible?

1 Answers  


Explain the callback plugin in ansible?

1 Answers  


How is ansible different from puppet?

1 Answers  


Suppose you’re using ansible to configure the production environment and your playbook uses an encrypted file. Encrypted files prompt the user to enter passwords. But since ansible is used for automation, can this process be automated?

1 Answers  


Categories