diff --git a/lib/ansible/modules/system/service.py b/lib/ansible/modules/system/service.py index fdcc4d39b9e..108427bb954 100644 --- a/lib/ansible/modules/system/service.py +++ b/lib/ansible/modules/system/service.py @@ -106,7 +106,8 @@ import select import time import string -if platform.system() == 'Linux': +# The distutils module is not shipped with SUNWPython on Solaris. +if platform.system() != 'SunOS': from distutils.version import LooseVersion class Service(object):