mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Modify task executor to reuse connection inside a loop. Fix WinRM connection to set _connected properly and display when remote shell is opened/closed. Add integration test using raw + with_items.
This commit is contained in:
parent
478c6c756a
commit
272778f732
3 changed files with 28 additions and 7 deletions
|
@ -101,3 +101,16 @@
|
|||
assert:
|
||||
that:
|
||||
- "raw_result2.stdout_lines[0] == '--% icacls D:\\\\somedir\\\\ /grant \"! ЗАО. Руководство\":F'"
|
||||
|
||||
# Assumes MaxShellsPerUser == 30 (the default)
|
||||
|
||||
- name: test raw + with_items to verify that winrm connection is reused for each item
|
||||
raw: echo "{{item}}"
|
||||
with_items: "{{range(32)|list}}"
|
||||
register: raw_with_items_result
|
||||
|
||||
- name: check raw + with_items result
|
||||
assert:
|
||||
that:
|
||||
- "not raw_with_items_result|failed"
|
||||
- "raw_with_items_result.results|length == 32"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue