Files
fedora-infra_ansible/playbooks/groups/zabbix.yml
Greg Sutcliffe 75609617d3 Zabbix: Cleanup, defaults, and MGMT interface items
Fairly big commit, this does:
- Any host including zabbix_agent will now register iteself with the server
  This means we can drop auto-registration once it's tested
- Any host with a "bmc:" entry in host_vars will add items/triggers to monitor it
  This means we don't need separate "hosts" for the MGMT interfaces
- Reverted to a single base template
  The split ones were overkill, we can handle the builders with host macros
- Added defaults to the roles
  This lets us override the connection vars from host/group vars (useful for testing)
- Lint & minor cleanup

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-22 16:23:21 +01:00

32 lines
762 B
YAML

---
- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
vars:
myhosts: "zabbix_stg:zabbix"
- name: Make the box be real
hosts: zabbix_stg:zabbix
user: root
gather_facts: true
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- base
- rkhunter
- hosts
- ipa/client
- collectd/base
- sudo
- { role: zabbix/zabbix_server, tags: zabbix_server }
- { role: zabbix/zabbix_agent, tags: zabbix_agent }
- { role: openvpn/client, when: env != "staging" }
pre_tasks:
- import_tasks: "{{ tasks_path }}/yumrepos.yml"
handlers:
- import_tasks: "{{ handlers_path }}/restart_services.yml"