win_rds: wait for reboot to be complete (#51849)

pull/51853/head
Jordan Borean 6 years ago committed by GitHub
parent d252cc7a2b
commit 6fcbfcf6b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,9 +19,24 @@
- name: reboot server if needed
win_reboot:
post_reboot_delay: 10
when: rds_install.reboot_required
# After a reboot Windows is still configuring the feature, this is a hack to wait until that is finished
- name: wait for component servicing to be finished
win_shell: |
$start = Get-Date
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\Winlogon\Notifications\Components\TrustedInstaller"
$tries = 0
while ((Get-ItemProperty -Path $path -Name Events).Events.Contains("CreateSession")) {
$tries += 1
Start-Sleep -Seconds 5
if (((Get-Date) - $start).TotalSeconds -gt 180) {
break
}
}
$tries
changed_when: False
- name: run win_rds_cap integration tests
include_tasks: win_rds_cap.yml

Loading…
Cancel
Save