added fail_if_missing shared service function

This commit is contained in:
Brian Coca 2016-11-16 20:56:40 -05:00
parent 2d2bb626d4
commit 5129e2fe16

View file

@ -45,3 +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):
if not found:
module.fail_json(msg='Could not find the requested service %s' % (service))