Debian Codegraph @

ansible_collections/community/windows/tests/integration/targets/win_msg/tasks/main.yml

raw
1 - name: Warn user
2 win_msg:
3 display_seconds: 10
4 msg: Keep calm and carry on.
5 register: msg_result
6
7 - name: Test msg_result
8 assert:
9 that:
10 - msg_result is not failed
11 - msg_result is changed
12 - msg_result.runtime_seconds < 10
13
14 - name: Warn user and wait for it
15 win_msg:
16 display_seconds: 5
17 msg: Keep calm and carry on.
18 #to: '{{ ansible_user }}'
19 wait: yes
20 register: msg_wait_result
21
22 - name: Test msg_wait_result
23 assert:
24 that:
25 - msg_wait_result is not failed
26 - msg_wait_result is changed
27 - msg_wait_result.runtime_seconds > 5
28
29 - name: fail to send a message > 255 characters
30 win_msg:
31 msg: "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"
32 register: fail_too_long
33 failed_when: "fail_too_long.msg != 'msg length must be less than 256 characters, current length: 256'"