From 03984cc21f9b2fbc6925a0c29d078fd140240a91 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Mon, 4 Apr 2022 13:42:33 +0200 Subject: icinga2: add extra conf dirs --- roles/icinga2/defaults/main.yml | 1 + roles/icinga2/templates/icinga2.conf.j2 | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'roles/icinga2') diff --git a/roles/icinga2/defaults/main.yml b/roles/icinga2/defaults/main.yml index d4fe89f..6a15a37 100644 --- a/roles/icinga2/defaults/main.yml +++ b/roles/icinga2/defaults/main.yml @@ -14,6 +14,7 @@ icinga: crt: '/etc/ssl/cert/ssl-cert-snakeoil.pem' key: '/etc/ssl/private/ssl-cert-snakeoil.key' ca: '/etc/ssl/certs/ca-certificates.crt' + extra_conf_dirs: [] config: manage: false git_url: '' diff --git a/roles/icinga2/templates/icinga2.conf.j2 b/roles/icinga2/templates/icinga2.conf.j2 index 921c2d6..0c17c24 100644 --- a/roles/icinga2/templates/icinga2.conf.j2 +++ b/roles/icinga2/templates/icinga2.conf.j2 @@ -20,6 +20,10 @@ include "ido-mysql.conf" include "api_users.conf" include "influx.conf" +{% for dir in icinga.extra_conf_dirs %} +include_recursive "{{ dir }}" +{% endfor %} + {% if icinga.config.manage is true %} include_recursive "conf.git.d" {% else %} -- cgit v1.2.3