Ansible logo

How to install Ansible on CentOS 7

Ansible is one of the most popular automation and configuration management tool available to anybody with computer systems to manage and automate. In this article, you’ll learn the simple task of installing it on CentOS 7.

Ansible is in the same space as Puppet, Chef, SaltStack, and CFEngine.

Unlike a few of those, Ansible, by default, operates over SSH, so you do not have to install an agent on the managed, or remote, systems.

Here’s an excerpt from the project’s official description:

Ansible is a radically simple IT automation engine that automates cloud provisioning, configuration management, application deployment, intra-service orchestration, and many other IT needs.

Ansible works by connecting to your nodes and pushing out small programs, called “Ansible Modules” to them. These programs are written to be resource models of the desired state of the system. Ansible then executes these modules (over SSH by default), and removes them when finished.

Your library of modules can reside on any machine, and there are no servers, daemons, or databases required. Typically you’ll work with your favorite terminal program, a text editor, and probably a version control system to keep track of changes to your content.

Ansible logo

Ansible is cross platform. However, the control machine cannot be a Windows system. For CentOS and Red Hat Enterprise Linux, the recommended mode of installation is via the system package manager. To install it on CentOS, you first have to enable the Extra Packages for Enterprise Linux (EPEL) repository, then install it using the package manager.

Related Post:  5 reasons to use a VPN

This code snippet shows the 2-step process involved in the installation of Ansible on CentOS 7, which will actually install the latest, stable edition.

Related Post:  How Artificial Intelligence is influencing the gaming world

After that, you can start playing with Ansible and get used to writing playbook. The official documentation is available here. Note that the steps to enable EPEL repos and install Ansible on RHEL 7 is slightly more involved than for CentOS. If you’re running RHEL 7, see this guide.

Please share:

Add a Comment

Your email address will not be published. Required fields are marked *