diff --git a/inventory/group_vars/nagios b/inventory/group_vars/nagios index 8bf9aafdc4..dc85692b1b 100644 --- a/inventory/group_vars/nagios +++ b/inventory/group_vars/nagios @@ -151,3 +151,12 @@ phx2_external: - retrace01.fedoraproject.org - secondary01.fedoraproject.org - stg.fedoraproject.org + +# Exclude these ansible host groups in hostgroups/all.cfg +exclude_hostgroups: + - nixnagios + - rhel8beta + - dbgserver_stg + - copr_keygen_dev_aws + - retrace_stg + - retrace_stg_aws diff --git a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 index 46ea881dd1..6e0264ce24 100644 --- a/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 +++ b/roles/nagios_server/templates/nagios/hostgroups/all.cfg.j2 @@ -3,7 +3,7 @@ ############### ## {{ env }} {% for key, value in groups.iteritems()|sort %} -{% if groups[key] != [] and key not in ['nixnagios', 'rhel8beta','dbgserver_stg'] %} +{% if groups[key] != [] and key not in vars['exclude_hostgroups'] %} define hostgroup{ hostgroup_name {{ key }} alias {{ key }}