diff --git a/changelogs/fragments/fix_zabbix_host_visible_name.yml b/changelogs/fragments/fix_zabbix_host_visible_name.yml new file mode 100644 index 00000000000..444f8b7d1f9 --- /dev/null +++ b/changelogs/fragments/fix_zabbix_host_visible_name.yml @@ -0,0 +1,2 @@ +bugfixes: + - zabbix_host - was not possible to update a host where visible_name was not set in zabbix diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py index 4bf667af1ba..572dd15d5ce 100644 --- a/lib/ansible/modules/monitoring/zabbix/zabbix_host.py +++ b/lib/ansible/modules/monitoring/zabbix/zabbix_host.py @@ -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