Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "add host tags" option in zabbix_action #1440

Open
ben-dataraven opened this issue Jan 3, 2025 · 0 comments
Open

Support for "add host tags" option in zabbix_action #1440

ben-dataraven opened this issue Jan 3, 2025 · 0 comments

Comments

@ben-dataraven
Copy link

SUMMARY

As a Zabbix administrator, I would like to be able to use the zabbix_action ansible module to create discovery and auto-registration actions that add host tags to discovered and auto-registered hosts

ISSUE TYPE

This is a request for improved feature parity between the zabbix_action ansible module and the Zabbix create action API (https://www.zabbix.com/documentation/current/en/manual/api/reference/action/object#action-operation).

The Zabbix API includes support for the add host tags operation, where the zabbix_action ansible module does not.

COMPONENT NAME

zabbix_action

ADDITIONAL INFORMATION

The feature would enable the automatic creation of discovery and autoregistration actions that include adding host tags

It's needed because, without it, the zabbix_action module removes any add host tags operations that have been added manually

    - name: Setup autoregistration action to automatically populate zabbix groups
      community.zabbix.zabbix_action:
        name: "Add {{ zabbix_proxy_hostname }} autoregistered hosts to groups"
        event_source: auto_registration
        state: present
        status: enabled
        esc_period: 60
        conditions:
          - type: proxy
            operator: "="
            value: "{{ zabbix_proxy_hostname }}"
        operations:
          - type: add_to_host_group
            host_groups:
              - "{{ host_group_1 }}"
              - "{{ host_group_2 }}"
          - type: add_host_tags
            tags:
              - name: customer
                value: "{{ customer_name }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant