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>
pull/65844/head
Ricardo Leonardo 5 years ago committed by ansibot
parent ff5253fa0e
commit d7414d55e1

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

@ -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

Loading…
Cancel
Save