mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
fix Windows env handling (#22927)
* fixes #22441 * fixes #22655 * moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
This commit is contained in:
parent
f1ab879bb6
commit
73f50b4f9f
8 changed files with 52 additions and 16 deletions
|
@ -831,12 +831,13 @@ def modify_module(module_name, module_path, module_args, task_vars=dict(), modul
|
|||
|
||||
return (b_module_data, module_style, to_text(shebang, nonstring='passthru'))
|
||||
|
||||
def build_windows_module_payload(module_name, module_path, b_module_data, module_args, task_vars, task, play_context):
|
||||
def build_windows_module_payload(module_name, module_path, b_module_data, module_args, task_vars, task, play_context, environment):
|
||||
exec_manifest = dict(
|
||||
module_entry=base64.b64encode(b_module_data),
|
||||
powershell_modules=dict(),
|
||||
module_args=module_args,
|
||||
actions=['exec']
|
||||
actions=['exec'],
|
||||
environment=environment
|
||||
)
|
||||
|
||||
exec_manifest['exec'] = base64.b64encode(to_bytes(leaf_exec))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue