summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/windows-minimal/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/windows-minimal/tasks/main.yml')
-rw-r--r--test/integration/targets/windows-minimal/tasks/main.yml32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/integration/targets/windows-minimal/tasks/main.yml b/test/integration/targets/windows-minimal/tasks/main.yml
index 1e075d7a61..9a3e83e831 100644
--- a/test/integration/targets/windows-minimal/tasks/main.yml
+++ b/test/integration/targets/windows-minimal/tasks/main.yml
@@ -85,3 +85,35 @@
ansible.windows.win_shell: echo "name=foo"
register: win_shell_collection_res
failed_when: win_shell_collection_res.stdout | trim != 'name=foo'
+
+- name: set ping data fact
+ set_fact:
+ # FUTURE: Fix psrp so it can handle non-ASCII chars in a non-pipeline scenario
+ ping_data: '{{ (ansible_connection == "psrp") | ternary("test", "汉语") }}'
+
+- name: run module with pipelining disabled
+ ansible.builtin.command:
+ cmd: >-
+ ansible windows
+ -m ansible.windows.win_ping
+ -a 'data={{ ping_data }}'
+ -i {{ '-i '.join(ansible_inventory_sources) }}
+ {{ '' if not ansible_verbosity else '-' ~ ('v' * ansible_verbosity) }}
+ -e ansible_remote_tmp='{{ remote_tmp_dir | regex_replace('\\', '\\\\') }}'
+ register: pipeline_disabled_res
+ delegate_to: localhost
+ environment:
+ ANSIBLE_KEEP_REMOTE_FILES: 'true'
+ ANSIBLE_NOCOLOR: 'true'
+ ANSIBLE_FORCE_COLOR: 'false'
+
+- name: view temp files
+ ansible.windows.win_shell: (Get-Item '{{ remote_tmp_dir }}\ansible-tmp-*\*').Name
+ register: pipeline_disabled_files
+
+- name: assert run module with pipelining disabled
+ assert:
+ that:
+ - >-
+ pipeline_disabled_res.stdout is search('\"ping\": \"' ~ ping_data ~ '\"')
+ - pipeline_disabled_files.stdout_lines == ["AnsiballZ_win_ping.ps1"]