|
|
@ -41,12 +41,10 @@
|
|
|
|
system: yes
|
|
|
|
system: yes
|
|
|
|
nobanner: true
|
|
|
|
nobanner: true
|
|
|
|
register: whoami_as_system
|
|
|
|
register: whoami_as_system
|
|
|
|
|
|
|
|
# Seems to be a bug with PsExec where the stdout can be empty, just retry the task to make this test a bit more stable
|
|
|
|
- name: Test whoami as SYSTEM
|
|
|
|
until: whoami_as_system.rc == 0 and whoami_as_system.stdout == 'nt authority\system'
|
|
|
|
assert:
|
|
|
|
retries: 3
|
|
|
|
that:
|
|
|
|
delay: 2
|
|
|
|
- whoami_as_system.rc == 0
|
|
|
|
|
|
|
|
- whoami_as_system.stdout == 'nt authority\system'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# FIXME: Behaviour is not consistent on all Windows systems
|
|
|
|
# FIXME: Behaviour is not consistent on all Windows systems
|
|
|
|
#- name: Run whoami as ELEVATED
|
|
|
|
#- name: Run whoami as ELEVATED
|
|
|
|