rename rhsm_repository_release to rhsm_release (#53430)
no changelog needed, as it is a new module for 2.8
This commit is contained in:
parent
2d172ee8ca
commit
530771e6f8
2 changed files with 15 additions and 15 deletions
|
@ -14,21 +14,21 @@ ANSIBLE_METADATA = {
|
|||
|
||||
DOCUMENTATION = '''
|
||||
---
|
||||
module: rhsm_repository_release
|
||||
short_description: Set or Unset RHSM Repository Release version
|
||||
module: rhsm_release
|
||||
short_description: Set or Unset RHSM Release version
|
||||
version_added: '2.8'
|
||||
description:
|
||||
- Sets or unsets the release version used by RHSM repositories.
|
||||
notes:
|
||||
- This module will fail on an unregistered system.
|
||||
Use the C(redhat_subscription) module to register a system
|
||||
prior to setting the RHSM repository release.
|
||||
prior to setting the RHSM release.
|
||||
requirements:
|
||||
- Red Hat Enterprise Linux 6+ with subscription-manager installed
|
||||
options:
|
||||
release:
|
||||
description:
|
||||
- RHSM repository release version to use (use null to unset)
|
||||
- RHSM release version to use (use null to unset)
|
||||
required: true
|
||||
author:
|
||||
- Sean Myers (@seandst)
|
||||
|
@ -36,24 +36,24 @@ author:
|
|||
|
||||
EXAMPLES = '''
|
||||
# Set release version to 7.1
|
||||
- name: Set RHSM repository release version
|
||||
rhsm_repository_release:
|
||||
- name: Set RHSM release version
|
||||
rhsm_release:
|
||||
release: "7.1"
|
||||
|
||||
# Set release version to 6Server
|
||||
- name: Set RHSM repository release version
|
||||
rhsm_repository_release:
|
||||
- name: Set RHSM release version
|
||||
rhsm_release:
|
||||
release: "6Server"
|
||||
|
||||
# Unset release version
|
||||
- name: Unset RHSM repository release release
|
||||
rhsm_repository_release:
|
||||
- name: Unset RHSM release release
|
||||
rhsm_release:
|
||||
release: null
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
current_release:
|
||||
description: The current RHSM repository release version value
|
||||
description: The current RHSM release version value
|
||||
returned: success
|
||||
type: str
|
||||
'''
|
|
@ -5,13 +5,13 @@ from __future__ import (absolute_import, division, print_function)
|
|||
__metaclass__ = type
|
||||
|
||||
from units.compat.mock import call, patch
|
||||
from ansible.modules.packaging.os import rhsm_repository_release
|
||||
from ansible.modules.packaging.os import rhsm_release
|
||||
from units.modules.utils import (
|
||||
AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args)
|
||||
|
||||
|
||||
class RhsmRepositoryReleaseModuleTestCase(ModuleTestCase):
|
||||
module = rhsm_repository_release
|
||||
module = rhsm_release
|
||||
|
||||
def setUp(self):
|
||||
super(RhsmRepositoryReleaseModuleTestCase, self).setUp()
|
||||
|
@ -19,12 +19,12 @@ class RhsmRepositoryReleaseModuleTestCase(ModuleTestCase):
|
|||
# Mainly interested that the subscription-manager calls are right
|
||||
# based on the module args, so patch out run_command in the module.
|
||||
# returns (rc, out, err) structure
|
||||
self.mock_run_command = patch('ansible.modules.packaging.os.rhsm_repository_release.'
|
||||
self.mock_run_command = patch('ansible.modules.packaging.os.rhsm_release.'
|
||||
'AnsibleModule.run_command')
|
||||
self.module_main_command = self.mock_run_command.start()
|
||||
|
||||
# Module does a get_bin_path check before every run_command call
|
||||
self.mock_get_bin_path = patch('ansible.modules.packaging.os.rhsm_repository_release.'
|
||||
self.mock_get_bin_path = patch('ansible.modules.packaging.os.rhsm_release.'
|
||||
'AnsibleModule.get_bin_path')
|
||||
self.get_bin_path = self.mock_get_bin_path.start()
|
||||
self.get_bin_path.return_value = '/testbin/subscription-manager'
|
Loading…
Reference in a new issue