|
|
@ -32,15 +32,8 @@
|
|
|
|
- raw_out.stdout_lines[4] == "winrm"
|
|
|
|
- raw_out.stdout_lines[4] == "winrm"
|
|
|
|
- raw_out.stdout_lines[5] == "string - \U0001F4A9"
|
|
|
|
- raw_out.stdout_lines[5] == "string - \U0001F4A9"
|
|
|
|
|
|
|
|
|
|
|
|
# Become only works on Server 2008 when running with basic auth, skip this host for now as it is too complicated to
|
|
|
|
|
|
|
|
# override the auth protocol in the tests.
|
|
|
|
|
|
|
|
- name: check if we running on Server 2008
|
|
|
|
|
|
|
|
win_shell: '[System.Environment]::OSVersion.Version -ge [Version]"6.1"'
|
|
|
|
|
|
|
|
register: os_version
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: test out become with psrp
|
|
|
|
- name: test out become with psrp
|
|
|
|
win_whoami:
|
|
|
|
win_whoami:
|
|
|
|
when: os_version|bool
|
|
|
|
|
|
|
|
register: whoami_out
|
|
|
|
register: whoami_out
|
|
|
|
become: yes
|
|
|
|
become: yes
|
|
|
|
become_method: runas
|
|
|
|
become_method: runas
|
|
|
@ -50,7 +43,6 @@
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- whoami_out.account.sid == "S-1-5-18"
|
|
|
|
- whoami_out.account.sid == "S-1-5-18"
|
|
|
|
when: os_version|bool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: test out async with psrp
|
|
|
|
- name: test out async with psrp
|
|
|
|
win_shell: Start-Sleep -Seconds 2; Write-Output abc
|
|
|
|
win_shell: Start-Sleep -Seconds 2; Write-Output abc
|
|
|
|