mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #8175/b674f94f backport][stable-7] module_utils/ipa.py: fix regex when parsing version (#8205)
module_utils/ipa.py: fix regex when parsing version (#8175)
* module_utils/ipa.py: fix regex when parsing version
* add changelog fragments
* Update changelogs/fragments/8175-get_ipa_version_regex.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Dmitriy Usachev <dmitrii.usachev@hyperus.team>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit b674f94f64
)
Co-authored-by: Dmitriy Usachev <diman-110@list.ru>
This commit is contained in:
parent
065287f260
commit
25a6603059
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/8175-get_ipa_version_regex.yml
Normal file
2
changelogs/fragments/8175-get_ipa_version_regex.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- ipa - fix get version regex in IPA module_utils (https://github.com/ansible-collections/community.general/pull/8175).
|
|
@ -104,7 +104,7 @@ class IPAClient(object):
|
||||||
|
|
||||||
def get_ipa_version(self):
|
def get_ipa_version(self):
|
||||||
response = self.ping()['summary']
|
response = self.ping()['summary']
|
||||||
ipa_ver_regex = re.compile(r'IPA server version (\d\.\d\.\d).*')
|
ipa_ver_regex = re.compile(r'IPA server version (\d+\.\d+\.\d+).*')
|
||||||
version_match = ipa_ver_regex.match(response)
|
version_match = ipa_ver_regex.match(response)
|
||||||
ipa_version = None
|
ipa_version = None
|
||||||
if version_match:
|
if version_match:
|
||||||
|
|
Loading…
Reference in a new issue