Rename rhsm_repository module to avoid conflict.
The rhsm_repository is now part of the Ansible installation, however, the version used inside the redhat_subscription role contains changes the defaul module from Ansible doesn't contain. As a consequence, if in the playbook execution, some task makes use of the rhsm_repository module Ansible will locate it inside its default module libraries and when we get to the point of invoking the module from ansible-role-redhat-subscription/tasks/portal.yml it will find out that the module is already loaded and make use of the Ansible one, instead of the module stored under library/ rhsm_repository.py. This is a temporary solution until we'll update into Ansible 2.8 for queens and rocky, then both modules will be in sync and the one from ansible-role-redhat-subscription/library could be removed. Change-Id: Id53ebefff1f992781171a1e760fbf5306020cb56 Closes-Bug: #1833519
This commit is contained in:
parent
a8b5d8124d
commit
93dbc5167d
|
@ -31,9 +31,11 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
|
||||||
'status': ['preview'],
|
'status': ['preview'],
|
||||||
'supported_by': 'community'}
|
'supported_by': 'community'}
|
||||||
|
|
||||||
|
# TODO(jfrancoa): Rename back into rhsm_repository once
|
||||||
|
# Ansible 2.8 is used.
|
||||||
DOCUMENTATION = '''
|
DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: rhsm_repository
|
module: rhsm_repository_conf
|
||||||
short_description:
|
short_description:
|
||||||
- Manage RHSM repositories using the subscription-manager command
|
- Manage RHSM repositories using the subscription-manager command
|
||||||
description:
|
description:
|
||||||
|
@ -70,21 +72,21 @@ options:
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
- name: Enable a RHSM repository
|
- name: Enable a RHSM repository
|
||||||
rhsm_repository:
|
rhsm_repository_conf:
|
||||||
name: rhel-7-server-rpms
|
name: rhel-7-server-rpms
|
||||||
|
|
||||||
- name: Disable all RHSM repositories
|
- name: Disable all RHSM repositories
|
||||||
rhsm_repository:
|
rhsm_repository_conf:
|
||||||
name: '*'
|
name: '*'
|
||||||
state: disabled
|
state: disabled
|
||||||
|
|
||||||
- name: Enable all repositories starting with rhel-6-server
|
- name: Enable all repositories starting with rhel-6-server
|
||||||
rhsm_repository:
|
rhsm_repository_conf:
|
||||||
name: rhel-6-server*
|
name: rhel-6-server*
|
||||||
state: enabled
|
state: enabled
|
||||||
|
|
||||||
- name: Disable all repositories except rhel-7-server-rpms
|
- name: Disable all repositories except rhel-7-server-rpms
|
||||||
rhsm_repository:
|
rhsm_repository_conf:
|
||||||
name: rhel-7-server-rpms
|
name: rhel-7-server-rpms
|
||||||
purge: True
|
purge: True
|
||||||
'''
|
'''
|
|
@ -27,7 +27,9 @@
|
||||||
- import_tasks: register.yml
|
- import_tasks: register.yml
|
||||||
|
|
||||||
- name: Configure repository subscriptions
|
- name: Configure repository subscriptions
|
||||||
rhsm_repository:
|
# TODO(jfrancoa): Change back into rhsm_repository once
|
||||||
|
# we start using Ansible 2.8.
|
||||||
|
rhsm_repository_conf:
|
||||||
name: "{{ rhsm_repos }}"
|
name: "{{ rhsm_repos }}"
|
||||||
purge: "{{ rhsm_repos_purge | default(omit) }}"
|
purge: "{{ rhsm_repos_purge | default(omit) }}"
|
||||||
state: "{{ rhsm_repos_state | default(omit) }}"
|
state: "{{ rhsm_repos_state | default(omit) }}"
|
||||||
|
|
Loading…
Reference in New Issue