ansible / ansible.builtin / v2.4.6.0-1 / module / zabbix_hostmacro Zabbix host macro creates/updates/deletes | "added in version" 2.0 of ansible.builtin" Authors: (@cave), Dean Hailin Song preview | supported by communityansible.builtin.zabbix_hostmacro (v2.4.6.0-1) — module
pip
Install with pip install ansible==2.4.6.0.post1
manages Zabbix host macros, it can create, update or delete them.
- name: Create a new host macro or update an existing macro's value local_action: module: zabbix_hostmacro server_url: http://monitor.example.com login_user: username login_password: password host_name: ExampleHost macro_name: Example macro macro_value: Example value state: present
state: choices: - present - absent default: present description: - State of the macro. - On C(present), it will create if macro does not exist or update the macro if the associated data is different. - On C(absent) will remove a macro if it exists. required: false timeout: default: 10 description: - The timeout of API request (seconds). host_name: description: - Name of the host. required: true login_user: description: - Zabbix user name. required: true macro_name: description: - Name of the host macro. required: true server_url: aliases: - url description: - Url of Zabbix server, with protocol (http or https). required: true macro_value: description: - Value of the host macro. required: true login_password: description: - Zabbix user password. required: true http_login_user: default: None description: - Basic Auth login required: false version_added: '2.1' version_added_collection: ansible.builtin http_login_password: default: None description: - Basic Auth password required: false version_added: '2.1' version_added_collection: ansible.builtin