self-hosting/playbooks/icinga2.yml

36 lines
733 B
YAML
Raw Normal View History

2025-01-12 10:41:43 +01:00
---
- name: Setup Icinga2 common things
gather_facts: false
hosts: all
roles:
2025-01-12 11:02:58 +01:00
- role: common_handlers
tags: always
2025-01-12 10:41:43 +01:00
- role: setup_nftables
tasks:
- name: Install required packages
become: true
ansible.builtin.apt:
name:
- icinga2
- monitoring-plugins-basic
- monitoring-plugins-common
- monitoring-plugins-standard
state: present
- name: Setup Icinga2 master
gather_facts: true
hosts: lime2servers
roles:
2025-01-12 11:02:58 +01:00
- role: common_handlers
tags: always
2025-01-12 10:41:43 +01:00
- role: icinga2_master
2025-01-12 10:45:08 +01:00
- name: Setup Icinga2 agent
gather_facts: true
hosts: mailservers
roles:
2025-01-12 11:02:58 +01:00
- role: common_handlers
tags: always
2025-01-12 10:45:08 +01:00
- role: icinga2_agent