diff --git a/playbooks/shadowdark_up/main.yml b/playbooks/shadowdark_up/main.yml index 9df7903..32b96ab 100644 --- a/playbooks/shadowdark_up/main.yml +++ b/playbooks/shadowdark_up/main.yml @@ -1,6 +1,7 @@ --- - name: Notify that shadowdark is up - hosts: shadowdark + hosts: bastian + connection: local tasks: - ansible.builtin.debug: - msg: Shadowdark is Live + msg: Shadowdark is {{ availability }} diff --git a/rulebooks/url_monitoring.yml b/rulebooks/url_monitoring.yml index 81e48eb..35e9f05 100644 --- a/rulebooks/url_monitoring.yml +++ b/rulebooks/url_monitoring.yml @@ -1,11 +1,11 @@ --- - name: Listen for events on a webhook - hosts: shadowdark + hosts: all sources: - ansible.eda.url_check: urls: - - http://localhost - delay: 60 + - http://shadowdark.seandersontech.com + delay: 10 rules: - name: Web site is up condition: event.url_check.status == "up" @@ -13,3 +13,16 @@ 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 +