From 0b7bab72e6470a912b0921a8a1503aed03dc606d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Mon, 23 Jun 2025 17:37:32 +0200 Subject: [PATCH] Nagios: filter the hostgroups again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Aurélien Bompard --- roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 index 3a136d6177..e2c0e7fb62 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 @@ -48,9 +48,9 @@ define hostgroup{ # Management hardware # define hostgroup { - hostgroup_name iad2_mgmt_systems - alias iad2_mgmt_systems - members {% for host in vars['iad2_management_hosts']|sort %}{{host}}{% if not loop.last %},{% endif %} {% endfor %} + hostgroup_name {{datacenter}}_mgmt_systems + alias {{datacenter}}_mgmt_systems + members {% for host in vars[datacenter+'_management_hosts']|sort %}{{host}}{% if not loop.last %},{% endif %} {% endfor %} }