2017-06-28 00:35:38 +00:00
|
|
|
- name: Warn user
|
|
|
|
win_msg:
|
|
|
|
display_seconds: 10
|
|
|
|
msg: Keep calm and carry on.
|
|
|
|
register: msg_result
|
|
|
|
|
|
|
|
- name: Test msg_result
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- msg_result is not failed
|
|
|
|
- msg_result is changed
|
2017-06-28 00:35:38 +00:00
|
|
|
- msg_result.runtime_seconds < 10
|
|
|
|
|
|
|
|
- name: Warn user and wait for it
|
|
|
|
win_msg:
|
|
|
|
display_seconds: 5
|
|
|
|
msg: Keep calm and carry on.
|
|
|
|
#to: '{{ ansible_user }}'
|
|
|
|
wait: yes
|
|
|
|
register: msg_wait_result
|
|
|
|
|
|
|
|
- name: Test msg_wait_result
|
|
|
|
assert:
|
|
|
|
that:
|
2017-11-27 22:58:08 +00:00
|
|
|
- msg_wait_result is not failed
|
|
|
|
- msg_wait_result is changed
|
2017-06-28 00:35:38 +00:00
|
|
|
- msg_wait_result.runtime_seconds > 5
|
2017-10-02 20:32:30 +00:00
|
|
|
|
|
|
|
- name: fail to send a message > 255 characters
|
|
|
|
win_msg:
|
|
|
|
msg: "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"
|
|
|
|
register: fail_too_long
|
|
|
|
failed_when: "fail_too_long.msg != 'msg length must be less than 256 characters, current length: 256'"
|