- hosts: all_win | |
user: chrome-bot | |
gather_facts: true | |
tasks: | |
# Based on | |
# https://skia.googlesource.com/buildbot/+/88653a3de83f54deffadb0af95acc697d467982f/skolo/ansible/switchboard/roles/apply_win_os_update/tasks/main.yml#60 | |
- name: Kill test_machine_monitor and Swarming | |
ansible.windows.win_powershell: | |
script: | | |
function Kill-Tree { | |
Param([int]$ppid) | |
Get-CimInstance Win32_Process | Where-Object { $_.ParentProcessId -eq $ppid } | ForEach-Object { Kill-Tree $_.ProcessId } | |
Stop-Process -Id $ppid | |
} | |
Get-Process -Name "test_machine_monitor" | ForEach-Object { Kill-Tree $_.Id } |