Introduction🧑🏫
So, are you wondering what Ansible is? And how can it help in the deployment of various IT tools? Let’s explore and discuss Ansible Environment Setup.

Before discussing Ansible Environment Setup, firstly let us know about Ansible. Ansible is an open-source IT engine that automates the deployment of many IT tools, including intra-service orchestration, cloud provisioning, and application deployment. It has no agents or custom security infrastructures, making deployment simple.
Ansible uses playbooks to describe automation jobs, and playbooks use YAML, a straightforward language that is simple for humans to understand, read, and write. YAML is a human-readable data serialization language that is frequently used for configuration files, but it can be used in various applications where data is stored. The advantage is that even IT infrastructure support guys can read, understand, and debug the playbook as necessary (YAML – It is in human-readable form).

Ansible is designed for multi-tier deployment. Ansible models IT infrastructure by describing how all systems are interrelated rather than managing one system simultaneously. Because Ansible is entirely agentless, it connects your nodes using SSH(by default). However, Ansible allows you to use the option of using another connection method, such as Kerberos.
Ansible pushes "Ansible Modules," which are small programs, after connecting to your nodes. When the modules have finished running on your nodes, Ansible will remove them. Simple text files are used by Ansible to manage your inventory (These are the hosts' files). Ansible uses a hosts file where users can group hosts and use playbooks to control specific groups' actions.
Now we will learn about the Ansible Environment Setup.
Installation Process

When we talk about deployment, there are primarily two types of machines −
- Control machine − a machine that enables us to manage other machines.
- Remote machine − machines handled or controlled by a control machine.
A single control machine can handle several remote machines. Therefore, we need to install Ansible on the control machine to manage remote machines.
So let us first understand Control Machine Requirements.
Control Machine Requirements

Any machine with Python 2 (versions 2.6 or 2.7) or Python 3 (versions 3.5 and higher) installed can run Ansible. Ansible, by default, manages remote machines via ssh.
No databases are added by Ansible. It cannot be started or run without any daemons. Ansible does not leave any software running or installed on remote machines while managing them. Therefore, while moving to a new version, there is no question about how to upgrade it. The latest release can be installed via Apt, yum, pkg, pip, OpenCSW, pacman, etc.
Installation through Apt on Ubuntu Machine

You need configure PPA on your machine in order to install Ansible. You should run the next line of code for this −
$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible $ sudo apt-get update
$ sudo apt-get install ansible
Hurray! Ansible Environment Setup is all done. Now you are ready to use Ansible to manage remote machines after running the above line of code. To determine the version and if Ansible was properly installed or not, simply run ansible-version.







