|
|
|
@ -312,6 +312,20 @@
|
|
|
|
- test_script_result_become.stdout_lines[0]|lower == 'nt authority\\system'
|
|
|
|
- test_script_result_become.stdout_lines[0]|lower == 'nt authority\\system'
|
|
|
|
- test_script_result_become.stdout_lines[1] == 'finished'
|
|
|
|
- test_script_result_become.stdout_lines[1] == 'finished'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: run test script with become set by vars
|
|
|
|
|
|
|
|
script: test_script_whoami.ps1
|
|
|
|
|
|
|
|
register: test_script_result_become_vars
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
|
|
ansible_become: yes
|
|
|
|
|
|
|
|
ansible_become_user: SYSTEM
|
|
|
|
|
|
|
|
ansible_become_method: runas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: check that the script ran and we get both outputs on new lines
|
|
|
|
|
|
|
|
assert:
|
|
|
|
|
|
|
|
that:
|
|
|
|
|
|
|
|
- test_script_result_become_vars.stdout_lines[0]|lower == 'nt authority\\system'
|
|
|
|
|
|
|
|
- test_script_result_become_vars.stdout_lines[1] == 'finished'
|
|
|
|
|
|
|
|
|
|
|
|
- name: run script that emits stderr from sub process
|
|
|
|
- name: run script that emits stderr from sub process
|
|
|
|
script: test_script_with_native_stderr.ps1
|
|
|
|
script: test_script_with_native_stderr.ps1
|
|
|
|
register: script_stderr
|
|
|
|
register: script_stderr
|
|
|
|
|