summaryrefslogtreecommitdiff
path: root/system/service.py
diff options
context:
space:
mode:
Diffstat (limited to 'system/service.py')
-rw-r--r--system/service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/service.py b/system/service.py
index a71e6382..af97e7df 100644
--- a/system/service.py
+++ b/system/service.py
@@ -131,6 +131,7 @@ import select
import time
import string
import glob
+from ansible.module_utils.service import fail_if_missing
# The distutils module is not shipped with SUNWPython on Solaris.
# It's in the SUNWPython-devel package which also contains development files
@@ -493,7 +494,7 @@ class LinuxService(Service):
self.enable_cmd = location['chkconfig']
if self.enable_cmd is None:
- self.module.fail_json(msg="no service or tool found for: %s" % self.name)
+ fail_if_missing(self.module, False, self.name, msg='host')
# If no service control tool selected yet, try to see if 'service' is available
if self.svc_cmd is None and location.get('service', False):