Stop-start automation

Features

c2platform.core.restart

  1. Orchestrate tasks over multiple nodes.
  2. Stop / start a service.
  3. Wait for a service.
  4. Wait for a port.
  5. Wait for an URL.
  6. Wait for a file.
  7. Run a command.
  8. Any routine.
  9. Any system.

Wait for services

ansible.windows.win_service

- name: Stop IIS
  ansible.windows.win_service:
    name: W3SVC
    state: stopped

Desired State Configuration

and

Idempotency

Any command

ansible.windows.win_powershell

$service = "W3SVC"
Stop-Service $service
Start-Sleep -Seconds 20
do {
    $running = Get-Service $service
    Start-Sleep -Seconds 5
}
while($running.Status -ne "Stopped")

Overview

How-to Restart

Conclusion