executor: systemctl_service_stop
input:
  service: "" 
  time_to_sleep: 0
  sudo: ""
steps:
# service restarted by hand because using API cause Venom failure (EOF)
- type: systemctl_service
  unit_command: stop
  service: "{{.input.service}}"
  sudo: "{{.input.sudo}}"

# let service restarts
- type: sleep
  time_to_sleep: "{{.input.time_to_sleep}}"

# check service status
- type: systemctl_service_status
  service: "{{.input.service}}"
  sudo: "{{.input.sudo}}"
  substring: "inactive (dead)"
  service_code: 3
