mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-13 20:49:11 -07:00
fix missing attribs with dirct module execution (#53875)
* fix missing attribs with dirct module execution * also make remote tmp handling smarter update tests * set default if attrib does not exist * add simple test
This commit is contained in:
parent
c6ed5b314d
commit
bda541fa0d
8 changed files with 59 additions and 30 deletions
|
@ -20,7 +20,7 @@ def patch_ansible_module(request, mocker):
|
|||
if '_ansible_remote_tmp' not in request.param['ANSIBLE_MODULE_ARGS']:
|
||||
request.param['ANSIBLE_MODULE_ARGS']['_ansible_remote_tmp'] = '/tmp'
|
||||
if '_ansible_keep_remote_files' not in request.param['ANSIBLE_MODULE_ARGS']:
|
||||
request.param['ANSIBLE_MODULE_ARGS']['_ansible_keep_remote_files'] = '/tmp'
|
||||
request.param['ANSIBLE_MODULE_ARGS']['_ansible_keep_remote_files'] = False
|
||||
args = json.dumps(request.param)
|
||||
else:
|
||||
raise Exception('Malformed data to the patch_ansible_module pytest fixture')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue