How to Automate with Ansible on RHEL9

During this series of blog posts, I am showcasing the process of updating my outdated Ansible playbooks. By doing so, this allows me to take advantage of newer versions of Ansible along with updated vendor modules.

As I have mentioned in several of my previous blog posts, I am a huge fan of automation and use it whenever possible and I hope this motivates you as well.

First we need to deploy RHEL9 and you can do this by following my previous blog posts Deploying RHEL9 and Installing Ansible

In this blog post I will demonstrate on to install the modules from VMware and NetApp on my RHEL9 server.

Install Python pip3

The most popular Python package manager, pip, used to be included in a typical Python install, but lately, it’s been excluded. Pip is a useful tool for running and developing Python scripts and is easy to install.

$ dnf install python3.11

Install VMware Modules for Ansible

  • Python pyVmomi supports 2.7.x and 3.4+
  • Ansible collection community.vmware

PyVmomi

Ansible VMware modules are written on top of pyVmomi and uses VMware vSphere API that allows you to manage ESX, ESXi, and vCenter infrastructure. You need to install this Python SDK on host from where you want to invoke VMware automation.

  • pyVmomi Python library supports Python 2.7.x and 3.4+.
pip3 install pyvmomi

Anisble Collection: Community.VMware

The Ansible collection community.vmware collection includes the VMware modules and plugins supported by Ansible VMware community to help the management of VMware infrastructure.

Before using the VMware community collection, you need to install the collection with the ansible-galaxy CLI:

ansible-galaxy collection install community.vmware

Install NetApp Modules for Ansible

  • Netapp-lib supports 2.7.x and 3.4+
  • Ansible collection Netapp.Ontap

To enable this adoption around storage technologies, Ansible and NetApp have partnered to develop a collection of automation and storage configuration management modules to easily provision, deploy and manage NetApp ONTAP, Element and E-Series storage platforms.

The Ansible and NetApp modules provide idempotent provisioning for:

  • Aggregates
  • Asynchronous Mirroring
  • Checking Connections
  • Disk Pools
  • Hosts and Host Groups (Clusters)
  • License Management
  • LUN Mapping
  • QTrees
  • Snapshot Scheduler
  • Standard Volumes and Flex Vols
  • SVM
  • Thin Volumes
  • Users, User Roles and Accounts
  • Volume Access Groups
  • Volume Snapshots
  • and much more…

These modules have been qualified by NetApp engineering to ensure they meet a variety of needs including provisioning, replication and general management.

Install NetApp-Lib

pip3 install netapp-lib

Anisble Collection: NetApp.Ontap

The Ansible collection NetApp.Ontapp collection includes the NetApp modules and plugins supported by Ansible NetApp community to help the management of NetApp storage arrays.

Before using the NetApp community collection, you need to install the collection with the ansible-galaxy CLI:

ansible-galaxy collection install netapp.ontap

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top