zabbix: configure hostgroup creation to run_once

Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
This commit is contained in:
David Kirwan 2024-02-13 12:56:42 +00:00
parent 60dd511113
commit f340a11c88
No known key found for this signature in database
GPG key ID: A5893AB6474AC37D
2 changed files with 2 additions and 1 deletions

View file

@ -1,5 +1,5 @@
---
- name: Create host groups
- name: Add hosts to hostgroups
community.zabbix.zabbix_host:
host_name: "{{ inventory_hostname }}"
host_groups: "{{ item['hostgroup']}}"

View file

@ -5,5 +5,6 @@
state: present
host_groups: "{{ item['hostgroup'] }}"
with_items: "{{ zabbix_templates }}" # Hostgroups specific to an ansible group can be overridden in inventory/group_vars/group_name
run_once: True
tags:
- zabbix_hostgroups