mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
@@ -214,7 +214,7 @@ def main():
|
||||
if out is None:
|
||||
out = ''
|
||||
|
||||
module.exit_json(
|
||||
ret = dict(
|
||||
cmd=args,
|
||||
stdout=out.rstrip('\r\n'),
|
||||
rc=rc,
|
||||
@@ -224,6 +224,12 @@ def main():
|
||||
changed=True,
|
||||
)
|
||||
|
||||
if rc:
|
||||
module.exit_json(**ret)
|
||||
else:
|
||||
ret['msg'] = 'command exceeded timeout'
|
||||
module.fail_json(**ret)
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
|
||||
|
||||
Reference in New Issue
Block a user