Announcing the Red Hat Enterprise Linux Certified Ansible Collection

Today we’re thrilled to announce that the RHEL System Roles Collection is now certified with Ansible Automation Platform and is being delivered to organizations through Ansible Automation Hub. Starting with the forthcoming RHEL 8.4, this means that the system roles Collection is immediately available under technology preview support and planned to be fully supported by both RHEL and Ansible Automation Platform product support experts. 

What is it, why use it

Red Hat Enterprise Linux (RHEL) is the world’s leading enterprise Linux platform. System administrators expect features and improvements to deliver on the agility demanded by their end users. In order to abstract away tedious, error-prone manual administration and configuration, RHEL system roles offer a path towards a repeatable and predictable operating system configuration. Under the hood, these Ansible roles and modules are now packaged, provided via an Ansible Content Collection

 

For customers with both RHEL and Ansible Automation Platform subscriptions, this means that the automation platform gains new certified content to predictably drive the configuration of RHEL, wherever it may be deployed, to ensure the stability that Red Hat customers expect from an enterprise Linux operating system. Finally, continuing the commitment for upstream community development and engagement, the Collection is maintained upstream at the Linux System Roles Collection and code is available via the GitHub repository.

What can it do?

RHEL system administrators are tasked with managing large fleets of RHEL instances across many different environments adhering to many different policies and standards for configuring systems within these different environments. 

 

The RHEL system roles Collection provides the ability to configure RHEL instances in the same way with predictable inputs for various system services. For example, it may be much easier to define the static IP addresses in an Ansible Playbook that will be applied to a new network interface than it is to recall the properly formatted command for nmcli or the correct format for network scripts files. 

How to get it

 

RHEL users typically manage many different versions of RHEL and require stable and consistent methods of automation. RHEL system roles aim to provide a consistent configuration and automation interface that is compatible with many RHEL releases. For Ansible Automation Platform customers that have configured the platform to pull from Automation Hub, this makes downloading and using the Collection simple with just a single command to install:

ansible-galaxy collection install redhat.rhel_system_roles

For RHEL customers, this Ansible Collection will be shipped in RPM format available from RHEL sources once the Collection graduates from technology preview to full support and part of RHEL 8.4.

What this Collection can be used for

As an example, once installed, the Collection can be used to destroy all eth0 interfaces as such:

---
- hosts: rhel7
  vars:
    network_connections:
      - name: eth0
        persistent_state: absent

  roles:
    - role: rhel-system-roles.network

A less destructive example might be adding static addresses to an interface:

---
- hosts: rhel7, rhel6
  vars:
    network_connections:
      - name: Pub_Web
        type: ethernet
        autoconnect: yes
        ip:
          dhcp4: no
          auto6: no
          route_metric6: -1
          gateway6: 2001:db8::1
          address:
            - 192.168.99.99/24
            - 2001:db8::80/7
  roles:
    - role: rhel-system-roles.network

Notice that the second example is targeting two different versions of RHEL. One key benefit of using this Collection is that many of the included roles can be used across major releases of RHEL to provide a consistent management and automation solution across RHEL releases.

 

It is important to note that in both examples, we’re interacting with the roles provided by this Collection, not the modules themselves. Red Hat has created an opinionated approach to managing the services governed by these roles and will continue to maintain the interaction between these roles and the underlying services being configured. 

 

This means that direct interaction with the modules contained in the Collection in user created playbooks is not supported. Additional support considerations are available on the Red Hat Customer Portal.

 

In addition to network configuration, this Collection also contains 24 roles for service automation of ssh(d), selinux, kdump, timesync, tlog, and more.

Takeaways

Ansible Content Collections represent the modular approach offered by Ansible Automation Platform. By using Red Hat’s centralized repository for all certified Collections, subscribers are able to gain access to fully supported automation content. The consumption of Collections themselves allow automation administrators and system administrators to collaborate on automation content to drive their environments without having to first take the time to crosstrain and demonstrate to automation administrators how to properly configure network interfaces using the command line, for example. 

 

Finally, this isn’t the end of our plans for certifying RHEL Collections. Many more are planned this year, which will be available in RPM format in RHEL releases, and on Automation Hub in the redhat namespace

Originally posted on Ansible Blog
Author:

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *