added fail_if_missing shared service function

pull/4420/head
Brian Coca 2016-11-16 20:56:40 -05:00
parent 2d2bb626d4
commit 5129e2fe16
1 changed files with 3 additions and 0 deletions

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