[bp-2.10] service - compare version without LooseVersion (#74619)
The distutils module is not shipped with SUNWPython on Solaris.
It's in the SUNWPython-devel package. Do not use LooseVersion.
Fixes: #74488
(cherry picked from commit 4d7dc15d4e
)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
8c95db4b8d
commit
a6a2af7814
2
changelogs/fragments/74488_solaris_looseversion.yml
Normal file
2
changelogs/fragments/74488_solaris_looseversion.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- service - compare version without LooseVersion API (https://github.com/ansible/ansible/issues/74488).
|
|
@ -1356,8 +1356,8 @@ class SunOSService(Service):
|
|||
# Support for synchronous restart/refresh is only supported on
|
||||
# Oracle Solaris >= 11.2
|
||||
for line in open('/etc/release', 'r').readlines():
|
||||
m = re.match(r'\s+Oracle Solaris (\d+\.\d+).*', line.rstrip())
|
||||
if m and m.groups()[0] >= 11.2:
|
||||
m = re.match(r'\s+Oracle Solaris (\d+)\.(\d+).*', line.rstrip())
|
||||
if m and m.groups() >= ('11', '2'):
|
||||
return True
|
||||
|
||||
def get_service_status(self):
|
||||
|
|
Loading…
Reference in a new issue