fixes bug: visible_name was not updated when not set in existing host… (#64095)

* fixes bug: visible_name was not updated when not set in existing host in zabbix

* Update changelogs/fragments/fix_zabbix_host_visible_name.yml

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>

* Update lib/ansible/modules/monitoring/zabbix/zabbix_host.py

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
This commit is contained in:
Ricardo Leonardo 2019-12-15 04:13:49 +01:00 committed by ansibot
parent ff5253fa0e
commit d7414d55e1
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- zabbix_host - was not possible to update a host where visible_name was not set in zabbix

View file

@ -533,7 +533,7 @@ class Host(object):
# Check whether the visible_name has changed; Zabbix defaults to the technical hostname if not set.
if visible_name:
if host['name'] != visible_name and host['name'] != host_name:
if host['name'] != visible_name:
return True
# Only compare description if it is given as a module parameter