From ca22f9baaccab56b0a4448dfc3f91d4ef80292f1 Mon Sep 17 00:00:00 2001 From: SeAndersonT Date: Tue, 10 Feb 2026 09:46:25 -0600 Subject: [PATCH] further changes to url_monitoring --- playbooks/shadowdark_up/main.yml | 5 +++-- rulebooks/url_monitoring.yml | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 5 deletions(-) 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 +