From bb41a005b31a74dca307b0a10424bcec90a8f905 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 16 Nov 2016 21:29:04 -0500 Subject: [PATCH] updated to add tailing msg to missing error --- lib/ansible/module_utils/service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/service.py b/lib/ansible/module_utils/service.py index b0d8ee33cf..ac41b6e3a0 100644 --- a/lib/ansible/module_utils/service.py +++ b/lib/ansible/module_utils/service.py @@ -45,6 +45,6 @@ def get_sysv_script(name): def sysv_exists(name): return os.path.exists(get_sysv_script(name)) -def fail_if_missing(module, found, service): +def fail_if_missing(module, found, service, msg=''): if not found: - module.fail_json(msg='Could not find the requested service %s' % (service)) + module.fail_json(msg='Could not find the requested service %s: %s' % (service, msg))