move the dns_external check to using a group variable in the nagios group. This takes it out of the main inventory where its names do not match and this other group was not used in any other playbook

This commit is contained in:
Stephen Smoogen 2020-07-01 17:40:02 -04:00
parent 4857a1f032
commit 28ba173acb
3 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,7 @@
define hostgroup {
hostgroup_name dns
alias DNS Servers
members {% for host in groups["dns_external"]|sort %} {{ hostvars[host]["inventory_hostname_short"] }}.fedoraproject.org {% if not loop.last %}, {% endif %} {% endfor %}
members {% for host in vars['dns_external']|sort %}{{ host }}{% if not loop.last %}, {% endif %} {% endfor %}
}