mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-03 01:03:09 +00:00
added fail_if_missing shared service function
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user