From 2272ab1f6f129b90fb5af546f46a5f7e578426a1 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Aug 27 2021 15:05:40 +0000 Subject: Add in a test to make that the nagios templates try to add in groups with no vpn. Signed-off-by: Stephen Smoogen --- diff --git a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 index 51b5eda..50b29be 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/vpnclients.cfg.j2 @@ -3,7 +3,7 @@ define hostgroup { hostgroup_name vpnclients alias vpnclients - members {% for host in groups['all']|sort %}{% if ( hostvars[host].vpn == true ) and ( hostvars[host].nagios_Can_Connect == true ) %}{{host}},{% endif %} {% endfor %} + members {% for host in groups['all']|sort %}{% if ( hostvars[host].vpn == true ) and ( hostvars[host].nagios_Can_Connect == true ) and (host not in group['ocp_stg', 'ocp']) %}{{host}},{% endif %}{% endfor %} } # TODO: Add !bastion02.iad2.fedoraproject.org above when it exists.