User Tools

Site Tools


linux:classnotes:rh294:chapter1:installing

Installing Ansible

You can get Ansible form following places

Ansible Code

VERY bare bones

Only has community support only

Community Ansible

ansible core and some ansible collections

Only community support

Redhat Repos

you get Ansible if you have RH Enterprise. The reasons they give it for free is so you can use:

  • RHEL Roles
  • Insight remediation
  • OPenscap automation look at RH415 class

Playbook File

Uses declarative architecture

contains a lists of plays that perform an actiopn

All playbook files are done in yaml

modules

Modules does automation, they are little programs

connection plugins

specify how you connection to your hosts, by default ssh for linux devices

Inventory

easiest way is with ini files

but there are also dynamic inventory tools that connect to Sat server to get a list of hosts or a tool that connects ot vmware vcenter

become plugin

RH recommends doing stuff with as little priviledge as possible. But if you need to elevate your rights there are plugins to do this

variable

handles variables

loockup

used to look up stuff inside files, DNS DB etc

Installation

To run Ansible Playbooks, install automation content navigator (ansible-navigator) on your control node and download an execution environment. Hosts that are managed by Ansible do not need to have ansible-navigator installed; you only need to install that tool on the control node from which you run Ansible Playbooks.

Python 3.8 or later needs to be installed on the control node before installing the ansible-core package.

You need a valid Red Hat Ansible Automation Platform subscription to install automation content navigator on your control node.

If you have activated Simple Content Access for your organization in the Red Hat Customer Portal, then you do not need to attach the subscription to your system.

The installation process is as follows:

you would need to use subscription-manager to register your system with Red Hat Subscription Management and enable the ansible-automation-platform-2.2-for-rhel-9-x86_64-rpms repository first.

Install automation content navigator on your control nodes.

[user@controlnode ~]$ sudo dnf install ansible-navigator

Verify that automation content navigator is installed on the system.

[user@controlnode ~]$ ansible-navigator --version
ansible-navigator 2.1.0 

Log in to the container registry.

[user@controlnode ~]$ podman login registry.redhat.io
Username: your-registry-username
Password: your-registry-password
Login Succeeded! 

Download the container image for the execution environment that you plan to use with automation content navigator. (Automation content navigator might also automatically download the default execution environment when you run the ansible-navigator command.)

[user@controlnode ~]$ podman pull \
> registry.redhat.io/ansible-automation-platform-22/ee-supported-rhel8:latest 

Display the list of locally available container images to verify that the image was downloaded.

[user@controlnode ~]$ ansible-navigator images
  Image                    Tag      Execution environment         Created         Size
0│ee-supported-rhel8       latest   True                          5 weeks ago     1.32 GB
linux/classnotes/rh294/chapter1/installing.txt · Last modified: by 127.0.0.1