mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 20:13:59 -07:00
win_say: Fix issue, add integration tests (#26089)
* win_say: Fix issue, add integration test This PR includes: - Make speed_speech an integer parameter - Test for empty parameters too - Add integration tests * Improve the $speech_speed parameter handling As requested
This commit is contained in:
parent
ff30682740
commit
0a15ab7ce9
4 changed files with 85 additions and 59 deletions
1
test/integration/targets/win_say/aliases
Normal file
1
test/integration/targets/win_say/aliases
Normal file
|
@ -0,0 +1 @@
|
|||
windows/ci/group3
|
36
test/integration/targets/win_say/tasks/main.yml
Normal file
36
test/integration/targets/win_say/tasks/main.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
- name: Warn of impending deployment
|
||||
win_say:
|
||||
msg: Warning, deployment commencing in 5 minutes, please log out.
|
||||
|
||||
- name: Using a different 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
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
- name: Remove message file
|
||||
win_file:
|
||||
path: C:\Windows\Temp\win_say_message.txt
|
||||
state: absent
|
||||
|
||||
- name: Different spech peed
|
||||
win_say:
|
||||
speech_speed: 5
|
||||
msg: Stay calm and proceed to the closest fire exit.
|
Loading…
Add table
Add a link
Reference in a new issue