2025-01-12 10:41:43 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Setup Icinga2 common things
|
|
|
|
gather_facts: false
|
|
|
|
hosts: all
|
|
|
|
tasks:
|
|
|
|
- name: Install required packages
|
2025-01-14 13:08:24 +01:00
|
|
|
tags: install
|
2025-01-12 10:41:43 +01:00
|
|
|
become: true
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name:
|
|
|
|
- icinga2
|
|
|
|
- monitoring-plugins-basic
|
|
|
|
- monitoring-plugins-common
|
|
|
|
- monitoring-plugins-standard
|
2025-02-02 18:28:10 +01:00
|
|
|
- monitoring-plugins-systemd
|
2025-01-12 10:41:43 +01:00
|
|
|
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-14 13:08:24 +01:00
|
|
|
tags: 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
|
2025-01-14 13:08:24 +01:00
|
|
|
tags: agent
|