Debian Codegraph @

test/integration/targets/connection_windows_ssh/tests.yml

raw
1 ---
2 - name: test out Windows SSH specific tests
3 hosts: windows
4 serial: 1
5 gather_facts: no
6
7 tasks:
8 - name: test out become with Windows SSH
9 win_whoami:
10 register: win_ssh_become
11 become: yes
12 become_method: runas
13 become_user: SYSTEM
14
15 - name: assert test out become with Windows SSH
16 assert:
17 that:
18 - win_ssh_become.account.sid == "S-1-5-18"
19
20 - name: test out async with Windows SSH
21 win_shell: Write-Host café
22 async: 20
23 poll: 3
24 register: win_ssh_async
25
26 - name: assert test out async with Windows SSH
27 assert:
28 that:
29 - win_ssh_async is changed
30 - win_ssh_async.rc == 0
31 - win_ssh_async.stdout == "café\n"
32 - win_ssh_async.stderr == ""
33
34 # Ensures the connection plugin can handle a timeout
35 # without raising another error.
36 - name: run command with timeout
37 win_shell: Start-Sleep -Seconds 10
38 timeout: 5
39 register: timeout_cmd
40 ignore_errors: true
41
42 - assert:
43 that:
44 - timeout_cmd.msg is contains 'Timed out after'