diff --git a/lib/ansible/modules/packaging/os/rhsm_repository_release.py b/lib/ansible/modules/packaging/os/rhsm_release.py similarity index 87% rename from lib/ansible/modules/packaging/os/rhsm_repository_release.py rename to lib/ansible/modules/packaging/os/rhsm_release.py index e9fdc6136e5..ba0afb61af1 100644 --- a/lib/ansible/modules/packaging/os/rhsm_repository_release.py +++ b/lib/ansible/modules/packaging/os/rhsm_release.py @@ -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 ''' diff --git a/test/units/modules/packaging/os/test_rhsm_repository_release.py b/test/units/modules/packaging/os/test_rhsm_release.py similarity index 97% rename from test/units/modules/packaging/os/test_rhsm_repository_release.py rename to test/units/modules/packaging/os/test_rhsm_release.py index d3c7128ae53..f652bfa64d8 100644 --- a/test/units/modules/packaging/os/test_rhsm_repository_release.py +++ b/test/units/modules/packaging/os/test_rhsm_release.py @@ -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'