mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Move binary module detection into executor/module_common.py
This commit is contained in:
parent
3466e73c50
commit
0faddfa168
6 changed files with 37 additions and 36 deletions
|
@ -54,18 +54,18 @@ class ActionModule(ActionBase):
|
|||
module_args['_ansible_no_log'] = True
|
||||
|
||||
# configure, upload, and chmod the target module
|
||||
(module_style, shebang, module_data, module_path, is_binary) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars)
|
||||
if is_binary:
|
||||
(module_style, shebang, module_data, module_path) = self._configure_module(module_name=module_name, module_args=module_args, task_vars=task_vars)
|
||||
if module_style == 'binary':
|
||||
self._transfer_file(module_path, remote_module_path)
|
||||
else:
|
||||
self._transfer_data(remote_module_path, module_data)
|
||||
|
||||
# configure, upload, and chmod the async_wrapper module
|
||||
(async_module_style, shebang, async_module_data, _, _) = self._configure_module(module_name='async_wrapper', module_args=dict(), task_vars=task_vars)
|
||||
(async_module_style, shebang, async_module_data, _) = self._configure_module(module_name='async_wrapper', module_args=dict(), task_vars=task_vars)
|
||||
self._transfer_data(async_module_path, async_module_data)
|
||||
|
||||
argsfile = None
|
||||
if module_style == 'non_native_want_json':
|
||||
if module_style in ('non_native_want_json', 'binary'):
|
||||
argsfile = self._transfer_data(self._connection._shell.join_path(tmp, 'arguments'), json.dumps(module_args))
|
||||
elif module_style == 'old':
|
||||
args_data = ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue