Zabbix role fixes #61

Merged
mconway merged 5 commits from zabbix_fixes into main 2026-05-16 19:57:20 +00:00
Owner

Summary

  • Fix SAML user directory condition (or False) that prevented it ever running (closes #56)
  • Fix Matrix media type macro interpolation — username was a literal string not a variable (closes #57)
  • Set static pod hostname to suppress years-old System name changed noise on Zabbix server restarts (closes #59)
  • Remove httpapi connection vars from vars/main.yml — they were bleeding into subsequent roles, causing postgresql-backup to connect to zabbix.conways.info instead of the k3s node (closes #60)
  • Reset connection after httpapi tasks as a secondary guard against var bleed
  • Comment out legacy ingress host discovery in zabbix-sites.yml — superseded by zabbix_ingress_monitor
  • Add postgresql_setup, postgresql_db, and postgresql_backup tags to postgresql-backup tasks for selective skipping during testing

Test plan

  • Run ansible-playbook playbook.yml --limit k3s_server --tags zabbix and confirm no SSL or connection errors
  • Confirm subsequent roles (e.g. k8s-alerta) run successfully in the same play
  • Confirm Zabbix SAML user directory is reconciled
  • Confirm Matrix alert user is updated correctly
## Summary - Fix SAML user directory condition (`or False`) that prevented it ever running (closes #56) - Fix Matrix media type macro interpolation — username was a literal string not a variable (closes #57) - Set static pod hostname to suppress years-old `System name changed` noise on Zabbix server restarts (closes #59) - Remove httpapi connection vars from `vars/main.yml` — they were bleeding into subsequent roles, causing `postgresql-backup` to connect to `zabbix.conways.info` instead of the k3s node (closes #60) - Reset connection after httpapi tasks as a secondary guard against var bleed - Comment out legacy ingress host discovery in `zabbix-sites.yml` — superseded by `zabbix_ingress_monitor` - Add `postgresql_setup`, `postgresql_db`, and `postgresql_backup` tags to `postgresql-backup` tasks for selective skipping during testing ## Test plan - [ ] Run `ansible-playbook playbook.yml --limit k3s_server --tags zabbix` and confirm no SSL or connection errors - [ ] Confirm subsequent roles (e.g. k8s-alerta) run successfully in the same play - [ ] Confirm Zabbix SAML user directory is reconciled - [ ] Confirm Matrix alert user is updated correctly
The `or False` short-circuited the when condition, preventing the
Authentik SAML user directory from ever being created via Ansible.

Closes #56

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
username was missing Jinja2 braces entirely, sending a literal
string to the Zabbix API instead of the variable value.

Closes #57
fix: set static pod hostname to suppress System name changed noise
Some checks failed
/ test (push) Successful in 2s
latex_diagram / latexmk (push) Failing after 17s
37bfbe5f63
Zabbix server pod restarts in K8s result in a new pod name being
used as the system hostname, firing an Info trigger continuously
since 2023. Setting a fixed hostname via extraPodSpecs ensures
system.hostname is always 'zabbix-server' across restarts.

Closes #59
httpapi connection vars (ansible_connection, ansible_host) were
leaking into subsequent roles in the same play, causing postgresql-
backup to connect to zabbix.conways.info instead of the k3s node.

Closes #60
fix zabbix vars overriding others
Some checks failed
/ test (push) Successful in 2s
latex_diagram / latexmk (push) Failing after 16s
aed92066eb
Add tags to postgres to allow skipping
mconway deleted branch zabbix_fixes 2026-05-16 19:57:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mconway/Homelab!61
No description provided.