community.general.rhsm_release module – Set or Unset RHSM Release version

Note

This module is part of the community.general collection (version 6.6.9).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: community.general.rhsm_release.

Synopsis

  • Sets or unsets the release version used by RHSM repositories.

Requirements

The below requirements are needed on the host that executes this module.

  • Red Hat Enterprise Linux 6+ with subscription-manager installed

Parameters

Parameter

Comments

release

string

RHSM release version to use.

To unset either pass null for this option, or omit this option.

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

  • This module will fail on an unregistered system. Use the community.general.redhat_subscription module to register a system prior to setting the RHSM release.

  • It is possible to interact with subscription-manager only as root, so root permissions are required to successfully run this module.

Examples

# Set release version to 7.1
- name: Set RHSM release version
  community.general.rhsm_release:
    release: "7.1"

# Set release version to 6Server
- name: Set RHSM release version
  community.general.rhsm_release:
    release: "6Server"

# Unset release version
- name: Unset RHSM release release
  community.general.rhsm_release:
    release: null

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

current_release

string

The current RHSM release version value

Returned: success

Authors

  • Sean Myers (@seandst)