Subscribe to our blog

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.

This Collection is also available upstream for the open source community at the following location in Ansible Galaxy:

ansible-galaxy collection install fedora.linux_system_roles

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, on Automation Hub and on Ansible Galaxy.


About the author

Colin McNaughton is a Principal Technical Marketing Manager for Ansible Automation. Colin has been with Red Hat for 7 years and, prior to this position, served as a Solution Architect in the southeast helping organizations grow their automation strategy. He has lived in NC for the past decade with his wife and two kids.

Read full bio

Browse by channel

automation icon

Automation

The latest on IT automation that spans tech, teams, and environments

AI icon

Artificial intelligence

Explore the platforms and partners building a faster path for AI

open hybrid cloud icon

Open hybrid cloud

Explore how we build a more flexible future with hybrid cloud

security icon

Security

Explore how we reduce risks across environments and technologies

edge icon

Edge computing

Updates on the solutions that simplify infrastructure at the edge

Infrastructure icon

Infrastructure

Stay up to date on the world’s leading enterprise Linux platform

application development icon

Applications

The latest on our solutions to the toughest application challenges

Original series icon

Original shows

Entertaining stories from the makers and leaders in enterprise tech