Check to ensure vars.tags is defined in Nagios template
This commit is contained in:
parent
d3ccfe8336
commit
e1138ebaad
@ -139,6 +139,7 @@ define hostgroup {
|
||||
# Inventory Hosts and related services
|
||||
{% for host in groups['tags_nagios'] %}
|
||||
{% set vars = hostvars[host] %}
|
||||
{% if vars.tags is defined %}
|
||||
define host {
|
||||
use ansible-linux-server
|
||||
host_name {{ host }}
|
||||
@ -213,4 +214,5 @@ define service {
|
||||
{# #}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
Loading…
Reference in New Issue
Block a user