mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases (#2571)
* rhsm_release: Fix the issue that rhsm_release module considers 8, 7Client and 7Workstation as invalid releases. * Fix the unit test error: The new release_matcher could pass a wider range of patterns but that would not cause extra issue to the whole module. * Submit the changelog fragment. * Update changelogs/fragments/2571-rhsm_release-fix-release_matcher.yaml Co-authored-by: Amin Vakil <info@aminvakil.com> Co-authored-by: Amin Vakil <info@aminvakil.com>
This commit is contained in:
parent
cc293f90a2
commit
593d622438
3 changed files with 7 additions and 6 deletions
|
@ -56,9 +56,9 @@ from ansible.module_utils.basic import AnsibleModule
|
|||
|
||||
import re
|
||||
|
||||
# Matches release-like values such as 7.2, 6.10, 10Server,
|
||||
# but rejects unlikely values, like 100Server, 100.0, 1.100, etc.
|
||||
release_matcher = re.compile(r'\b\d{1,2}(?:\.\d{1,2}|Server)\b')
|
||||
# Matches release-like values such as 7.2, 5.10, 6Server, 8
|
||||
# but rejects unlikely values, like 100Server, 1.100, 7server etc.
|
||||
release_matcher = re.compile(r'\b\d{1,2}(?:\.\d{1,2}|Server|Client|Workstation|)\b')
|
||||
|
||||
|
||||
def _sm_release(module, *args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue