mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 12:59:09 -07:00
parent
87be961c1d
commit
ed832c89f4
1 changed files with 7 additions and 1 deletions
|
@ -214,7 +214,7 @@ def main():
|
||||||
if out is None:
|
if out is None:
|
||||||
out = ''
|
out = ''
|
||||||
|
|
||||||
module.exit_json(
|
ret = dict(
|
||||||
cmd=args,
|
cmd=args,
|
||||||
stdout=out.rstrip('\r\n'),
|
stdout=out.rstrip('\r\n'),
|
||||||
rc=rc,
|
rc=rc,
|
||||||
|
@ -224,6 +224,12 @@ def main():
|
||||||
changed=True,
|
changed=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if rc:
|
||||||
|
module.exit_json(**ret)
|
||||||
|
else:
|
||||||
|
ret['msg'] = 'command exceeded timeout'
|
||||||
|
module.fail_json(**ret)
|
||||||
|
|
||||||
# import module snippets
|
# import module snippets
|
||||||
from ansible.module_utils.basic import *
|
from ansible.module_utils.basic import *
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue