Install Ansible on CentOS 8

Comments Off on Install Ansible on CentOS 8

Ansible is used to manage and administer multiple servers from a central computer. Installing Ansible on CentOS 8 is very straightforward. Enable epel-release first and then install ansible

sudo yum install -y epel-release
sudo yum install -y ansible

Check Ansible is installed

ansible --version

You will get something output like below for the above command

ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/zillurgcp03/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /home/zillurgcp03/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.12 (default, Sep 21 2021, 00:10:52) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
  jinja version = 2.10.3
  libyaml = True

All are set. Now you can write your playbooks to provision configuration to host nodes. In Ansible terms, the server where Ansible is installed is called the control node, and the servers/hosts where configuration is pushed are called host nodes.