Monitoring psk (#2)

Co-authored-by: DerLinkman <derlinkman@gmail.com>
Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2026-07-18 19:37:52 +00:00
co-authored by DerLinkman
parent cab59c1658
commit a31751af1d
10 changed files with 452 additions and 47 deletions
+36 -11
View File
@@ -1,11 +1,36 @@
---
- name: Stop playbook if system is not Debian
ansible.builtin.fail:
msg: "This role only supports Debian."
when: ansible_facts['os_family'] != "Debian"
- name: Ensure Zabbix passive servers are defined
ansible.builtin.assert:
that:
- monitoring_zabbix_passive_servers | length > 0
fail_msg: "Set monitoring_zabbix_passive_servers to the IPs, CIDRs or DNS names allowed to query the agent."
---
- name: Stop playbook if system is not Debian
ansible.builtin.fail:
msg: "This role only supports Debian."
when: ansible_facts['os_family'] != "Debian"
- name: Ensure Zabbix passive servers are defined
ansible.builtin.assert:
that:
- monitoring_zabbix_passive_servers | length > 0
fail_msg: "Set monitoring_zabbix_passive_servers to the IPs, CIDRs or DNS names allowed to query the agent."
- name: Ensure Zabbix API settings are defined when host registration is enabled
ansible.builtin.assert:
that:
- monitoring_zabbix_api_url is defined
- monitoring_zabbix_api_url | length > 0
- monitoring_zabbix_api_user is defined
- monitoring_zabbix_api_user | length > 0
- monitoring_zabbix_api_password is defined
- monitoring_zabbix_api_password | length > 0
fail_msg: >-
monitoring_zabbix_api_url, monitoring_zabbix_api_user and
monitoring_zabbix_api_password must be set (password lives in vault.yml)
when monitoring_zabbix_register_host is true.
when: monitoring_zabbix_register_host | bool
- name: Ensure proxy address is set when a proxy is configured
ansible.builtin.assert:
that:
- monitoring_zabbix_proxy_address is defined
- monitoring_zabbix_proxy_address | length > 0
fail_msg: >-
monitoring_zabbix_proxy_address (IP/DNS of the proxy the agent contacts)
must be set when monitoring_zabbix_proxy is defined.
when: monitoring_zabbix_proxy | length > 0