Files
computer-playbook/roles/sys-ctl-hlth-webserver
Kevin Veen-Birkenbach 03bea763f1 Ensure deterministic ordering of web health expectations and add unit tests
This update sorts all expectation keys alphabetically to guarantee idempotent
Ansible deployments and stable systemd unit generation. Added two unit tests to
validate proper key ordering for canonical domains, aliases, redirects, and WWW
mappings.

Reference: https://chatgpt.com/share/692ae99b-dd88-800f-8fad-2ff62666e295
2025-11-29 13:40:31 +01:00
..
2025-09-23 19:18:22 +02:00

sys-ctl-hlth-webserver

Description

Verifies that each of your Nginxserved domains returns an expected HTTP status (200, 301, etc.) and alerts on deviations.

Features

  • Scans your nginx server block .conf files for domains.
  • HEAD-requests each domain and compares against per-domain expected codes.
  • Reports any mismatches via sys-ctl-alm-compose.
  • Scheduled via a systemd timer for periodic health sweeps.

Usage

Include this role, install python-requests, and define on_calendar_health_nginx.

Further Resources

Contributions

This role was created with the assistance of ChatGPT. The conversation can be found here and here.