1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/win_say/tasks/main.yml
jhawkesworth 361acd3547 win_say: Port to use CSharpUtil AnsibleBasic ()
* port win-say to use CSharpUtil AnsibleBasic and add warning when requested voice not found

* win_say: fixes following code review: use C# style properties consistently; prefix changelog fragments

* fix invalid yaml in change log fragment

* win_say: fixes following code review: use generic module parameter validation where possible

* remove redundant setting of Result.changed to false, simplified some logic for readability.

* fix serialisation issue when message text is drawn from a file; allows tests to be run not in check mode and fix up some test descriptions
2018-11-19 07:07:12 +10:00

44 lines
1.4 KiB
YAML

# CI hosts don't have a valid Speech package so we rely on check mode for basic
# sanity tests
---
- name: Warn of impending deployment
win_say:
msg: Warning, deployment commencing in 5 minutes, please log out.
check_mode: "{{ win_say_check_mode |default('yes') }}"
- name: Using a specified voice and a start sound
win_say:
msg: Warning, deployment commencing in 5 minutes, please log out.
start_sound_path: C:\Windows\Media\ding.wav
voice: Microsoft Hazel Desktop
check_mode: "{{ win_say_check_mode |default('yes') }}"
- name: Example with start and end sound
win_say:
msg: New software installed
start_sound_path: C:\Windows\Media\Windows Balloon.wav
end_sound_path: C:\Windows\Media\chimes.wav
check_mode: "{{ win_say_check_mode |default('yes') }}"
- name: Create message file
win_copy:
content: Stay calm and carry on
dest: C:\Windows\Temp\win_say_message.txt
- name: Text from file example
win_say:
msg_file: C:\Windows\Temp\win_say_message.txt
start_sound_path: C:\Windows\Media\Windows Balloon.wav
end_sound_path: C:\Windows\Media\chimes.wav
check_mode: "{{ win_say_check_mode |default('yes') }}"
- name: Remove message file
win_file:
path: C:\Windows\Temp\win_say_message.txt
state: absent
- name: Different speech speed
win_say:
speech_speed: 5
msg: Stay calm and proceed to the closest fire exit.
check_mode: "{{ win_say_check_mode |default('yes') }}"