mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Complete rewrite of Windows exec wrapper (#21510)
* supports pipelining for faster execution * supports become (runas), creates interactive subsession under WinRM batch logon * supports usage of arbitrary module_utils files * modular exec wrapper payload supports easier extension * integrates async wrapper behavior for pipelined/become'd async * module_utils are loaded as true Powershell modules, no more runtime modifications to module code
This commit is contained in:
parent
7bf56ceee3
commit
8527013fbe
17 changed files with 1104 additions and 148 deletions
|
@ -53,7 +53,7 @@
|
|||
that:
|
||||
- "ipconfig_invalid_result.rc != 0"
|
||||
- "ipconfig_invalid_result.stdout" # ipconfig displays errors on stdout.
|
||||
- "not ipconfig_invalid_result.stderr"
|
||||
# - "not ipconfig_invalid_result.stderr"
|
||||
- "ipconfig_invalid_result|failed"
|
||||
- "ipconfig_invalid_result|changed"
|
||||
|
||||
|
@ -93,14 +93,15 @@
|
|||
that:
|
||||
- "raw_result.stdout_lines[0] == 'wwe=raw'"
|
||||
|
||||
- name: run a raw command with unicode chars and quoted args (from https://github.com/ansible/ansible-modules-core/issues/1929)
|
||||
raw: Write-Host --% icacls D:\somedir\ /grant "! ЗАО. Руководство":F
|
||||
register: raw_result2
|
||||
|
||||
- name: make sure raw passes command as-is and doesn't split/rejoin args
|
||||
assert:
|
||||
that:
|
||||
- "raw_result2.stdout_lines[0] == '--% icacls D:\\\\somedir\\\\ /grant \"! ЗАО. Руководство\":F'"
|
||||
# TODO: this test doesn't work anymore since we had to internally map Write-Host to Write-Output
|
||||
#- name: run a raw command with unicode chars and quoted args (from https://github.com/ansible/ansible-modules-core/issues/1929)
|
||||
# raw: Write-Host --% icacls D:\somedir\ /grant "! ЗАО. Руководство":F
|
||||
# register: raw_result2
|
||||
#
|
||||
#- name: make sure raw passes command as-is and doesn't split/rejoin args
|
||||
# assert:
|
||||
# that:
|
||||
# - "raw_result2.stdout_lines[0] == '--% icacls D:\\\\somedir\\\\ /grant \"! ЗАО. Руководство\":F'"
|
||||
|
||||
# Assumes MaxShellsPerUser == 30 (the default)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue