1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[PR #6401/486c47f9 backport][stable-5] rhsm_release: removing required=true for 'release' option (#6408)

rhsm_release: removing required=true for 'release' option (#6401)

Fix rhsm_release by removing required=true for 'release' option.

(cherry picked from commit 486c47f922)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2023-04-23 18:49:18 +02:00 committed by GitHub
parent 5dc60cbc9e
commit af4ac4813e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "rhsm_release - make ``release`` parameter not required so it is possible to pass ``null`` as a value. This only was possible in the past due to a bug in ansible-core that now has been fixed (https://github.com/ansible-collections/community.general/pull/6401)."

View file

@ -23,8 +23,8 @@ requirements:
options: options:
release: release:
description: description:
- RHSM release version to use (use null to unset) - RHSM release version to use.
required: true - To unset either pass C(null) for this option, or omit this option.
type: str type: str
author: author:
- Sean Myers (@seandst) - Sean Myers (@seandst)
@ -34,17 +34,17 @@ EXAMPLES = '''
# Set release version to 7.1 # Set release version to 7.1
- name: Set RHSM release version - name: Set RHSM release version
community.general.rhsm_release: community.general.rhsm_release:
release: "7.1" release: "7.1"
# Set release version to 6Server # Set release version to 6Server
- name: Set RHSM release version - name: Set RHSM release version
community.general.rhsm_release: community.general.rhsm_release:
release: "6Server" release: "6Server"
# Unset release version # Unset release version
- name: Unset RHSM release release - name: Unset RHSM release release
community.general.rhsm_release: community.general.rhsm_release:
release: null release: null
''' '''
RETURN = ''' RETURN = '''
@ -97,7 +97,7 @@ def set_release(module, release):
def main(): def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec=dict( argument_spec=dict(
release=dict(type='str', required=True), release=dict(type='str'),
), ),
supports_check_mode=True supports_check_mode=True
) )