Ansible is an open-source platform developed with Python and Ruby programming languages that allow you to manage or configure servers or network infrastructure via automation. Ansible is an automation system that enables the management of many servers in data centers, cloud structure, physical or virtual environments, and some processes such as application distribution, software provision, configuration management, etc. without the need for agent installation. It has a coding structure that is easy to read and understand and is therefore very popular. Ansible is actually a startup project developed in 2012. It was bought by Red Hat in 2015 and included in their ecosystem.
Ansible enables the tasks or roles defined in certain file types to be executed by running on the hosts in the inventory. Thus, it adopts a new computer to be added to a system, a service to be updated or a new program to be installed, with configurations suitable for our environments and makes it ready. In this way, you will be able to easily run Ansible modules and tasks on specific server groups and check their results. Ansible offers many ready-made modules, tasks and roles developed internally or externally. It has a simpler structure compared to alternative systems such as Puppet, Chef and Salt.
There are 3 basic components in Ansible that should be known at the first stage.
Inventories are where you define your devices or servers on which will be managed by Ansible. You can add your hosts to these inventories by creating several different inventories according to your usage purpose or by creating a single inventory for all your hosts. Ansible is actually a very capable framework for network automation. Creating different inventories to separate your network devices and servers will make you very comfortable in terms of management.
Basically, playbooks are files in YAML format where we write down the operations to be automated as tasks, enter the variables to be used and store all other information.
Modules are pre-prepared scripts or command sets that we run directly on the relevant hosts via playbooks. It can be prepared in many different languages, even you can call it from the playbook by writing a module yourself and adding it into Ansible. Currently, there are thousands of ready-made modules that you can actively use, you can reach the module list by clicking here.
What are the advantages of Ansible?
- It’s completely free.
- Does not require agent installation.
- It has an easily scalable structure.
- It has easy installation and configuration.
- A secure connection is established with SSH.
- The YAML format is used to create scripts.
- It is possible to automate operational work for all systems that can be connected with SSH.
What is Ansible Tower?
Ansible works via the command line. Ansible Tower, on the other hand, enables the management of structures such as Playbook, host inventory and access information via a simpler web interface. Many operations performed with Ansible can be easily managed from the web environment thanks to the simple interface of Ansible Tower.
What are the advantages of Ansible Tower?
- Modern UI.
- Easy to use.
- It provides role-based access control.
- Job scheduling.
- Cloud integration.
- UI based inventory management.