mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 06:18:33 +01:00
feat: icinga mail notifications
This commit is contained in:
@@ -90,6 +90,18 @@
|
||||
notify:
|
||||
- restart icinga
|
||||
|
||||
- name: Template icinga configuration
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: /etc/icinga2/conf.d/
|
||||
owner: root
|
||||
group: nagios
|
||||
mode: 0640
|
||||
with_items:
|
||||
- mail_notifications.conf
|
||||
notify:
|
||||
- restart icinga
|
||||
|
||||
- name: Change icinga log level
|
||||
lineinfile:
|
||||
path: /etc/icinga2/features-enabled/mainlog.conf
|
||||
|
||||
11
roles/monitoring-master/tasks/icinga_postfix.yaml
Normal file
11
roles/monitoring-master/tasks/icinga_postfix.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
- name: install postfix
|
||||
apt:
|
||||
pkg:
|
||||
- postfix
|
||||
|
||||
- name: copy postfix config
|
||||
template:
|
||||
src: postfix_main.cf
|
||||
dest: /etc/postfix/main.cf
|
||||
notify:
|
||||
- restart postfix
|
||||
@@ -5,6 +5,13 @@
|
||||
- icinga
|
||||
- monitoring-master
|
||||
|
||||
- name: Postfix/Mail for icinga
|
||||
include: icinga_postfix.yaml
|
||||
when: monitoring_master
|
||||
tags:
|
||||
- icinga
|
||||
- monitoring-master
|
||||
|
||||
- name: Grafana.yaml
|
||||
include: icinga.yaml
|
||||
when: monitoring_master
|
||||
|
||||
Reference in New Issue
Block a user