29 lines
722 B
YAML
29 lines
722 B
YAML
---
|
|
- name: Listen for events on a webhook
|
|
hosts: all
|
|
sources:
|
|
- ansible.eda.url_check:
|
|
urls:
|
|
- http://shadowdark.seandersontech.com
|
|
delay: 10
|
|
rules:
|
|
- name: Web site is up
|
|
condition: event.url_check.status == "up"
|
|
action:
|
|
run_job_template:
|
|
name: "Shadowdark Up"
|
|
organization: Default
|
|
job_args:
|
|
extra_vars:
|
|
availability: up
|
|
- name: Web site is down
|
|
condition: event.url_check.status == "down"
|
|
action:
|
|
run_job_template:
|
|
name: "Shadowdark Up"
|
|
organization: Default
|
|
job_args:
|
|
extra_vars:
|
|
availability: down
|
|
|