Ansible introduction

Ansible (https://docs.ansible.com) is a software that automates software provisioning, configuration management, and application deployment. It is categorized as an orchestration tool. In other words, Ansible allows DevOps to manage their servers, configurations, and applications in a simple, robust, and parallel way.

Ansible is a deployment-automation tool, similar to Puppet and Chef, but its main characteristic is that it is agentless; that is, it does not need to install an agent on managed hosts.

This tool manages its different nodes through SSH for the provisioning of services based on Python and YAML to describe the actions to be carried out and the configurations that should be propagated to the different nodes.

One of the keys to the success of Ansible is the design of its API, which has resulted in the community being able to provide new modules that continuously incorporate the interaction with new software.

Ansible performs a deployment of configurations, installations, and actions on multiple machines, thus enabling an effective, fast, and resource-saving automated management capacity. It does not require a database to store the options or capabilities, nor the tasks to be performed. Ansible is based on flat text files written in the YAML language that will be used to define the machines, the variables, and the tasks to be performed. To perform the tasks, Ansible has a series of modules that are capable of interacting with tools within managed systems.

The Ansible configuration is defined in the YAML format. Basically, Ansible translates declarative YAML files into shell commands and runs them on remote hosts using the SSH protocol:

- hosts: all
tasks:
- name: add user into the system
user: name=username state=present shell=/bin/bash
- name: install ngnix into the system
apt: pkg=nginx state=present
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset