1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

updated to add tailing msg to missing error

This commit is contained in:
Brian Coca 2016-11-16 21:29:04 -05:00
parent 5129e2fe16
commit bb41a005b3

View file

@ -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))