From 11abb39bbc0aefb0d073bbbe5a9defa038bebfec Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Tue, 10 Jan 2017 16:59:25 +0000 Subject: [PATCH] because its not doing what I want.. really I dont --- .../nagios_server/templates/nagios/hostgroups/all.cfg.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 index d3b687b158..84ed0c4076 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 @@ -1,6 +1,7 @@ ############### # All Servers and associated devices ############### +## {{ env }} {% for key, value in groups.iteritems() %} {% if env == "staging" %} @@ -26,7 +27,9 @@ define hostgroup{ {$ endif %} {% endfor %} -{{ env }} + +## +## Management hardware define hostgroup { hostgroup_name phx2_mgmt_systems alias phx2_mgmt_systems @@ -35,10 +38,13 @@ define hostgroup { } {% if env != "staging" %} +## +## VPN clients define hostgroup { hostgroup_name vpnclients alias vpnclients members {% for host in groups['all'] %}{% if hostvars[host].vpn %}{{host}},{% endif %} {% endfor %} } + {% endif %}