community / community.general / 0.1.1 / module / rhsm_repository Manage RHSM repositories using the subscription-manager command Authors: Giovanni Sciortino (@giovannisciortino) preview | supported by communitycommunity.general.rhsm_repository (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the C(subscription-manager) command.
- 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
name: description: - The ID of repositories to enable. - To operate on several repositories this can accept a comma separated list or a YAML list. required: true purge: default: false description: - Disable all currently enabled repositories that are not not specified in C(name). Only set this to C(True) if passing in a list of repositories to the C(name) field. Using this with C(loop) will most likely not have the desired result. type: bool state: choices: - present - enabled - absent - disabled default: present description: - If state is equal to present or disabled, indicates the desired repository state. required: true
repositories: description: - 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. returned: success type: list