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:
Chris Church 2015-11-23 11:53:05 -05:00
commit 272778f732
3 changed files with 28 additions and 7 deletions

View file

@ -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"