We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Updating current macros on a template will remove the description.
zabbix_template module
- name: Create Test Template community.zabbix.zabbix_template: template_json: zabbix_export: version: "6.4" templates: - name: Template for Testing uuid: 63ba665582334ce6b8077c9bf7a3763f description: "Testing template import" template: Test Template groups: - name: Templates macros: - macro: '{$TEST}' value: "123" description: "Macro Description" state: present - name: Get Template community.zabbix.zabbix_template_info: template_name: "Test Template" format: json omit_date: no register: template_json - name: Print Macro Before Modification debug: msg: "{{ template_json.template_json.zabbix_export.templates | selectattr('macros') }}" - name: Modify Macro community.zabbix.zabbix_template: template_name: "Test Template" macros: - macro: '{$TEST}' value: "12345" - name: Get Template After Modification community.zabbix.zabbix_template_info: template_name: "Test Template" format: json omit_date: no register: template_json_after - name: Print Macro After Modification debug: msg: "{{ template_json_after.template_json.zabbix_export.templates | selectattr('macros') }}"
Output
TASK [zabbix : Create Test Template] ******************************************************************************************************************************************************************************************************************************************************************************* changed: [localhost] TASK [zabbix : Get Template] *************************************************************************************************************************************************************************************************************************************************************************************** ok: [localhost] TASK [zabbix : Print Macro Before Modification] ******************************************************************************************************************************************************************************************************************************************************************** ok: [localhost] => { "msg": [ { "description": "Testing template import", "groups": [ { "name": "Templates" } ], "macros": [ { "description": "Macro Description", "macro": "{$TEST}", "value": "123" } ], "name": "Template for Testing", "template": "Test Template", "uuid": "63ba665582334ce6b8077c9bf7a3763f" } ] } TASK [zabbix : Modify Macro] *************************************************************************************************************************************************************************************************************************************************************************************** changed: [localhost] TASK [zabbix : Get Template After Modification] ******************************************************************************************************************************************************************************************************************************************************************** ok: [localhost] TASK [zabbix : Print Macro After Modification] ********************************************************************************************************************************************************************************************************************************************************************* ok: [localhost] => { "msg": [ { "description": "Testing template import", "groups": [ { "name": "Templates" } ], "macros": [ { "macro": "{$TEST}", "value": "12345" } ], "name": "Template for Testing", "template": "Test Template", "uuid": "63ba665582334ce6b8077c9bf7a3763f" } ] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
SUMMARY
Updating current macros on a template will remove the description.
ISSUE TYPE
We need to be able to update the macros on templates without it clearing the description of the macro (add description arguemnt).
COMPONENT NAME
zabbix_template module
ADDITIONAL INFORMATION
Output
The text was updated successfully, but these errors were encountered: