Building Blocks of Ansible
Ansible is an enormously popular automation framework that has been used to automate IT operations for a long time. It simplifies the management of IT infrastructure and translates business logic into well-defined implementation procedures.
Ansible is written in Python and communicates with infrastructure with APIs, including SSH. It started support for networking devices beginning with Ansible 1.9, and since Ansible 2.9, the support for network devices has grown extensively.
In this chapter, we will introduce the main components of Ansible and outline the different features and options that Ansible supports. The following are the recipes that will be covered:
- Installing Ansible
- Building the Ansible inventory
- Controlling Ansible’s options
- Defining Ansible variables
- Building a playbook
- Using Ansible conditionals
- Using Ansible loops
- Securing secrets with Ansible Vault
- Using Jinja2 templates...