infra/ansible/roles
Graham McIntire 88bdbbe88f
ansible: add 'monitor' role mirroring live monitor.vntx.net (Icinga2 + Web 2)
Codifies the bare-metal Icinga2 master + Icinga Web 2 stack on
monitor.vntx.net (Ubuntu 22.04, Apache + mod_php, MariaDB 10.6, Icinga
2.16, IDO-MySQL backend). Re-running the role against the live host
should produce a near-identical configuration.

Role includes:
- Icinga apt repo + full package set (icinga2, ido-mysql, icingaweb2,
  monitoring-plugins, nagios-plugins-contrib, php + apache deps).
- MariaDB DB + user provisioning for both icinga2 (IDO daemon) and
  icingaweb2 (UI), plus a separate read-only `icinga` user that the UI
  uses to read the IDO. Schema bootstrapped only on first install.
- Templated icinga2 config (constants/zones/icinga2.conf), features-
  enabled symlinks (api/checker/command/ido-mysql/mainlog), and the
  three secret-bearing conf.d files (api-users, pagerduty x2) wired to
  vault vars.
- 23 dormant conf.d/* host + service definitions copied verbatim under
  files/. The live install has `include_recursive "conf.d"` commented
  out (a node-setup CLI artifact); role mirrors that. Set
  `icinga2_load_confd: true` in host_vars to rehydrate them.
- Icinga Web 2 ini files (config/auth/groups/roles/modules) + templated
  resources.ini for DB credentials. monitoring module enabled via
  symlink. icingaweb2 admin user bootstrapped on first install via a
  one-shot insert into icingaweb_user (gated on schema-not-yet-imported).
- Apache rewrite + ssl modules. Vhost itself is left to certbot --apache
  (Let's Encrypt cert is operator-managed, role doesn't manage it).

Cluster-wide cleanup:
- Gut roles/general/tasks/debian/icinga2.yml down to the uninstall
  safety net (kept the sweep that removes icinga2 from non-monitoring
  hosts). The previous master-side install + cert-distribution tasks
  referenced templates that never existed in the role; the new monitor
  role replaces them properly.

Operator action before first apply:
- Create host_vars/monitor.vntx.net/vault.yml with the seven required
  secrets (see roles/monitor/README.md). Live values can be pulled from
  /etc/icinga2/conf.d/{api-users,pagerduty-*,ido-mysql}.conf and
  /etc/icingaweb2/resources.ini on the live host.
- Generate the icingaweb2 admin password hash via
  `php -r 'echo password_hash("plaintext", PASSWORD_DEFAULT);'`.
- Run --check --diff before applying; the role is meant to be idempotent
  but hasn't been verified against the live install.
2026-05-08 13:00:53 -05:00
..
alertmanager prom: add prometheus stack (prometheus, alertmanager, grafana, node_exporter) 2026-05-08 09:50:31 -05:00
almalinux update 2026-01-30 17:27:52 -06:00
aprsc update to reflect 380 prod 2026-03-10 10:05:17 -05:00
base update to reflect 380 prod 2026-03-10 10:05:17 -05:00
caddy ansible: rewrite netbox role to match live netbox.vntx.net (bare-metal install) 2026-05-08 12:17:30 -05:00
debian/tasks add ansible 2025-05-30 13:24:38 -05:00
debug add ansible 2025-05-30 13:24:38 -05:00
dokku updates 2026-03-16 17:40:30 -05:00
firewall update 2026-04-04 17:40:50 -05:00
forgejo change 2026-04-20 13:00:52 -05:00
general ansible: add 'monitor' role mirroring live monitor.vntx.net (Icinga2 + Web 2) 2026-05-08 13:00:53 -05:00
grafana ansible: fix two latent bugs surfaced by repo audit 2026-05-08 11:09:14 -05:00
icinga2-container/files updates 2025-09-06 10:55:13 -05:00
librenms update to reflect 380 prod 2026-03-10 10:05:17 -05:00
mailcow cleanup and reorg 2026-01-08 16:31:48 -06:00
monitor ansible: add 'monitor' role mirroring live monitor.vntx.net (Icinga2 + Web 2) 2026-05-08 13:00:53 -05:00
netbox ansible: rewrite netbox role to match live netbox.vntx.net (bare-metal install) 2026-05-08 12:17:30 -05:00
node_exporter prom: add prometheus stack (prometheus, alertmanager, grafana, node_exporter) 2026-05-08 09:50:31 -05:00
ns update 2026-04-21 12:40:18 -05:00
prometheus prom: add app-specific grafana dashboards + per-pod job override 2026-05-08 10:25:17 -05:00
resolvers updates 2026-03-16 17:40:30 -05:00
syncthing cleanup and reorg 2026-01-08 16:31:48 -06:00
tailscale/tasks cleanup and reorg 2026-01-08 16:31:48 -06:00
ubuntu update 2026-01-30 17:27:52 -06:00
uisp update to reflect 380 prod 2026-03-10 10:05:17 -05:00
.DS_Store add ansible 2025-05-30 13:24:38 -05:00
requirements.yml ansible: drop dead caddy_ansible dep + commented-out ns/netbox/tailscale_home plays 2026-05-08 12:02:35 -05:00