mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-12-02 15:39:57 +00:00
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
sys-ctl-hlth-webserver
Description
Verifies that each of your Nginx‐served domains returns an expected HTTP status (200, 301, etc.) and alerts on deviations.
Features
- Scans your
nginxserver block.conffiles 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
- For more details on nginx configurations, visit nginx documentation.
- Learn more about Ansible's
uri_modulehere.
Contributions
This role was created with the assistance of ChatGPT. The conversation can be found here and here.