Automation is a crucial element in IT since it directly affects the time of completion and efficiency of production. Automation simplifies complex and risky tasks and hence helps the developers manage the system more easily by allowing them to focus on other tasks that add value to the organization. Ansible, ‘the darling’ of automation is a widely used open-source software automation tool in the industry. Studies show that Intel, Evernote, Hootsuite, and even Apple have adopted Ansible to their development lifecycle.
Ansible is an open-source IT Configuration Management, Deployment & Orchestration tool. It aims to provide large productivity gains to a wide variety of automation challenges. This tool is very simple to use yet powerful enough to automate complex multi-tier IT application environments. It includes its own declarative language to describe system configuration.
Ansible Playbooks are the files where Ansible code is written. These files are written in the language, YAML, which is a funny acronym for, “YAML Ain’t no Markup Language.”
Playbooks contain one or more Plays. Plays map a group of computers to a few well-defined roles known as Tasks. **Tasks **can be defined as Ansible scripts.
Write an Ansible PlayBook that does the following operations in the managed nodes:
Step 1: Install Ansible using pip command
command :
pip3 install ansible
Check whether ansible is installed or not using
command :
ansible --version
**Step 2: **Configure the Ansible
Save the IP address of Managed Node in <file.txt> and also give username and password for login purposes.
#docker #devops #automation #yaml #ansible