ansible / ansible.builtin / v2.8.13 / module / zabbix_group Create/delete Zabbix host groups | "added in version" 1.8 of ansible.builtin" Authors: Cove (@cove), Tony Minfei Ding (!UNKNOWN), Harrison Gu (@harrisongu) preview | supported by communityansible.builtin.zabbix_group (v2.8.13) — module
pip
Install with pip install ansible==2.8.13
Create host groups if they do not exist.
Delete existing host groups if they exist.
# Base create host groups example - name: Create host groups local_action: module: zabbix_group server_url: http://monitor.example.com login_user: username login_password: password state: present host_groups: - Example group1 - Example group2
# Limit the Zabbix group creations to one host since Zabbix can return an error when doing concurrent updates - name: Create host groups local_action: module: zabbix_group server_url: http://monitor.example.com login_user: username login_password: password state: present host_groups: - Example group1 - Example group2 when: inventory_hostname==groups['group_name'][0]
state: choices: - present - absent default: present description: - Create or delete host group. required: false host_groups: aliases: - host_group description: - List of host groups to create or delete. required: true http_login_user: description: - Basic Auth login required: false type: str http_login_password: description: - Basic Auth password required: false type: str