rhsm_repository – Manage RHSM repositories using the subscription-manager command¶
New in version 2.5.
- Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the
The below requirements are needed on the host that executes this module.
- In order to manage RHSM repositories the system must be already registered to RHSM manually or using the Ansible
- name: Enable a RHSM repository rhsm_repository: name: rhel-7-server-rpms - name: Disable all RHSM repositories rhsm_repository: name: '*' state: disabled - name: Enable all repositories starting with rhel-6-server rhsm_repository: name: rhel-6-server* state: enabled - name: Disable all repositories except rhel-7-server-rpms rhsm_repository: name: rhel-7-server-rpms purge: True
Common return values are documented here, the following are the fields unique to this module:
The list of RHSM repositories with their states.
When this module is used to change the repository states, this list contains the updated states after the changes.