Ansible

Ansible is an open-source IT Automation Tool that has the capability of automating provisioning, configuration management, application deployment, orchestration, and automating many other manual IT processes. Ansible executes commands over SSH, and typically no additional servers, daemons, or databases are required. Ansible is an agentless automation tool that you install on your host. USGS’s first steps towards configuration management will be a repository of Ansible Playbooks, which are blueprints of automation tasks that have limited to no human involvement.

The managed node (the machine that Ansible is managing) requires python 2.7 or python 3.5-3.11 to run Ansible library code. The managed node also needs a user account that can SSH to the node with an interactive POSIX shell.

How to install Ansible:

This information is derived from the Ansible Documentation.

Red Hat Linux Derivatives should use RPM, so we will use yum to install Ansible.

  1. RHEL 8: yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
  2. [For Future Use on RHEL9:] yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
  3. Install Ansible. yum install -y ansible git

Ubuntu:

  1. Update all package lists from repositories and updates. sudo apt update
  2. This command will allow you to manage distribution and software from independent sources outside of Ubuntu managed sources. sudo apt install software-properties-common
  3. Add the Ansible Personal Package Archive (PPA) sudo add-apt-repository --yes --update ppa:ansible/ansible
  4. Install Ansible. sudo apt install ansible

Amazon Linux 2:

  1. Use Amazon-Linux-Extras to install Ansible.
    sudo amazon-linux-extras install -y ansible2

Verify that Ansible installed by running the ansible version command: ansible --version

Comments are closed.