zabbix: Hopefully workaround custom_template conditional.

Signed-off-by: James Antill <james@and.org>
This commit is contained in:
James Antill
2025-06-20 12:28:23 -04:00
parent 0af9b7b58d
commit ad44f5d6e5

View File

@@ -17,7 +17,13 @@
template_json: "{{ lookup('file', item['template'] ) }}"
state: present
with_items: "{{ zabbix_templates }}" # Templates specific to an ansible group, can be overwridden in inventory/group_vars/group_name
when: "{{ item['custom_template'] }}"
# 2025-06-20: ansible started warning with:
# [WARNING]: conditional statements should not include jinja2 templating delimiters such as {{ }} or {% %}.
# Found: {{ item['custom_template'] }}
# So try changing this:
# when: "{{ item['custom_template'] }}"
# To:
when: item.custom_template
tags:
- zabbix_add_templates
- zabbix_templates