added fail_if_missing shared service function
This commit is contained in:
parent
2d2bb626d4
commit
5129e2fe16
1 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue