Skip to content

Commit

Permalink
Fix Zabbix 5.4 template imports failing
Browse files Browse the repository at this point in the history
Applications are no longer supported, everything is solved through tags now.
  • Loading branch information
href committed Jun 24, 2021
1 parent 6061c49 commit 0d1a5f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/modules/zabbix_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,10 @@ def import_template(self, template_content, template_type='json'):
if LooseVersion(self._zbx_api_version) >= LooseVersion('5.2'):
update_rules["templateDashboards"] = update_rules.pop("templateScreens")

# Zabbix 5.4 no longer supports applications
if LooseVersion(self._zbx_api_version) >= LooseVersion('5.4'):
update_rules.pop('applications', None)

# The loaded unicode slash of multibyte as a string is escaped when parsing JSON by json.loads in Python2.
# So, it is imported in the unicode string into Zabbix.
# The following processing is removing the unnecessary slash in escaped for decoding correctly to the multibyte string.
Expand Down

0 comments on commit 0d1a5f6

Please sign in to comment.