ansible-collections / community.zabbix

Zabbix Ansible modules
http://galaxy.ansible.com/community/zabbix
Other
329 stars 285 forks source link

Support for Template Groups with zabbix_template_group #1147

Closed cjohannsen81 closed 11 months ago

cjohannsen81 commented 11 months ago
SUMMARY

The collection does not support the creation of template groups in Ansible 6.4 right now. When adding templates without a template group, the group becomes mandatory.

ISSUE TYPE
COMPONENT NAME

zabbix_template_group module

ADDITIONAL INFORMATION

The creation of a template group becomes mandatory when adding templates to a special template group that's not the standard one. Template Groups are different than Host Groups which have their own module.

  community.zabbix.zabbix_template:
    template_name: ExampleHost
    template_groups:
      - Role
      - Role2
    link_templates:
      - Example template1
      - Example template2
    macros:
      - macro: "{$EXAMPLE_MACRO1}"
        value: 30000
      - macro: "{$EXAMPLE_MACRO2}"
        value: 3
      - macro: "{$EXAMPLE_MACRO3}"
        value: "Example"
    state: present

Leads to:

fatal: [ubuntu]: FAILED! => {"changed": false, "msg": "template_groups are required when creating a new Zabbix template"}

Screenshots (6.0 vs 6.4)

03_14_12

Screenshot 2023-12-13 at 8 02 34 AM
cjohannsen81 commented 11 months ago

Seems like there's a pull request already: #1104