Introduction
Ansible is a simple automation engine that automates cloud provisioning, configuration management, and application deployments. At this point, you should have an excellent FastAPI example application and some clean Terraform for provisioning an EC2 instance and all the necessary cloud infrastructure to make it accessible and ready for configuration and the deployment of an application.
This section will get us up and running with working with Ansible, firstly to do some traditional system administration, secondly to manage the deployment of an application.
Automation is a tool to mitigate human error and quickly ensure that your IT infrastructure is in a consistent, correct state.
- Ansible is an open-source automation platform that can adapt to many different workflows and environments.
- Ansible can be used to manage many different types of systems, including servers running Linux, Microsoft Windows, or UNIX, and network devices.
- Ansible Playbooks are human-readable text files that describe the desired state of an IT infrastructure.
- Ansible is built around an agentless architecture in which Ansible is installed on a control node and clients do not need any special agent software.
- Ansible connects to managed hosts using standard network protocols such as SSH and runs code or commands on the managed hosts to ensure that they are in the state specified by Ansible.
Red Hat Ansible Automation subscription includes support for Ansible itself for as Red Hat Ansible Engine.
Red Hat Ansible Engine is available via special channels as a convenience to Red Hat Enterprise Linux subscribers.
There are two types of machines in the Ansible architecture: control nodes and managed hosts. Ansible is installed and run from a control node, and this machine also has copies of your Ansible project files. A control node could be an administrator's laptop, a system shared by a number of administrators, or a server running Red Hat Ansible Tower.
Managed hosts are listed in an inventory, which also organizes those systems into groups for easier collective management. The inventory can be defined in a static text file, or dynamically determined by scripts that get information from external sources.