community.general.rhsm_repository – Manage RHSM repositories using the subscription-manager command¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.rhsm_repository
.
Synopsis¶
Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the
subscription-manager
command.
Requirements¶
The below requirements are needed on the host that executes this module.
subscription-manager
Parameters¶
Notes¶
Note
In order to manage RHSM repositories the system must be already registered to RHSM manually or using the Ansible
redhat_subscription
module.
Examples¶
- name: Enable a RHSM repository
community.general.rhsm_repository:
name: rhel-7-server-rpms
- name: Disable all RHSM repositories
community.general.rhsm_repository:
name: '*'
state: disabled
- name: Enable all repositories starting with rhel-6-server
community.general.rhsm_repository:
name: rhel-6-server*
state: enabled
- name: Disable all repositories except rhel-7-server-rpms
community.general.rhsm_repository:
name: rhel-7-server-rpms
purge: True
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Giovanni Sciortino (@giovannisciortino)