Before discussing Ansible Playbook let’s understand Ansible. In IT, doing repetitive tasks is not interesting and is also considered non-productive.
So, Red Hat started an open source community projectย “Ansible” which is a simple automation tool that helps teams to automate most of their IT tasks.
Now the question arises how do they do it?
The answer is an Ansible playbook.
An Ansible playbook is a file that contains a set of instructions (tasks) that are executed by Ansible.
Playbooks are written in YAML format and are used to automate tasks such as configuration management, infrastructure management, application deployment, and system administration.
A playbook consists of one or more plays, which are a collection of tasks that are performed on a single host or set of hosts.
Tasks can be as simple as below:
- installing a package
- applying a security patch
- creating a user account
- copying a file etc…
As Ansible is agentless, playbooks can be created once and can be executed as and when needed on servers/ hosts.
Playbooks are designed to be idempotent, meaning that they can be run multiple times without causing any adverse effects.
https://www.ansible.com/community?hsLang=en-us
Thank you for reading this article, I really appreciate it. If you have any questions, feel free to leave a comment.