Ansible Control Node Deployment Guide#

The following instructions are for deploying the Ansible Control Node.

Prerequisites#

This guide is written for a Red Hat Enterprise Linux 8 based operating system which is operating within a cluster of systems and the following are the prerequisites:

If deploying as a standalone service, adjust the hostname fields accordingly and omit steps involving IdM, NFS, and follow-on deployment guides.

Follow-on Deployments#

The following guides can be applied after the deployment of their associated nodes.

References#

These instructions were written for Ansible 2.12 with Ansible Core 5.4

Instructions are based on the following documentation:
https://docs.ansible.com/ansible/latest/installation_guide/

Deployment Scripts#

Note

An example bash script of the instructions has been provided: deploy-ansible-control-node.sh

Deployment Steps#

Important

The Red Hat’s CodeReady Linux Builder Repository or AlmaLinux PowerTools/CRB Repository and the EPEL Repository are required for deploying the Ansible Control Node. These additional repositories are not needed on Ansible Managed Nodes.

Note

Instructions assume execution using the root account.

  1. Connect the system to the NFS Server:

  1. Connect the system to the IdM Server:

  1. Enable Red Hat’s CodeReady Linux Builder/AlmaLinux PowerTools/CRB Repository:

For Red Hat Enterprise Linux 8

subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
dnf distro-sync

For AlmaLinux 8

dnf config-manager --set-enabled powertools
dnf distro-sync
  1. Install Extra Packages for Enterprise Linux (EPEL) Repository:

dnf -y install epel-release
  1. Install Ansible:

dnf -y install ansible
  1. Install Ansible command shell completion:

python3 -m pip install --user argcomplete
/root/.local/bin/activate-global-python-argcomplete
  1. Create a default configuration file:

mv /etc/ansible/ansible.cfg /etc/ansible/ansible.cfg.old
ansible-config init --disabled > /etc/ansible/ansible.cfg
  1. Set default options:

sed -i "s|;interpreter_python=.*|interpreter_python=/usr/libexec/platform-python|g" /etc/ansible/ansible.cfg
sed -i "s|;nocows=.*|nocows=True|g" /etc/ansible/ansible.cfg