From 43c2c084797807343fbc3a3a54d828b3b888c845 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 10 Jan 2017 18:23:40 +0000 Subject: [PATCH] staring me in the face for 4 hours.. if it were a grue I would be dead --- .../templates/nagios/hostgroups/all.cfg.j2 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 index 38bed32338..a71e53dfca 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 @@ -22,7 +22,25 @@ define hostgroup{ members {% for host in groups[key] %}{{host}}, {% endfor %} } +{% endif %} {% endfor %} +## +## VPN clients +define hostgroup { + hostgroup_name vpnclients + alias vpnclients + members {% for host in groups['all'] %}{% if hostvars[host].vpn %}{{host}},{% endif %} {% endfor %} + +} {% endif %} + +## +## Management hardware +define hostgroup { + hostgroup_name phx2_mgmt_systems + alias phx2_mgmt_systems + members {% for host in vars['phx2_management_hosts'] %}{{host}}{% if not loop.last %},{% endif %} {% endfor %} + +}