Partner links

How to install Ansible on CentOS 7

Ansible logo

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.

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.

# First install the package that enables the EPEL repo
yum install epel-release

#Then install Ansible
yum install ansible

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.

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
0
Hya, what do you think? Please comment.x
()
x