Skip to content

Commit

Permalink
Update changelog comment and modify module
Browse files Browse the repository at this point in the history
  • Loading branch information
masa-orca committed Jan 12, 2024
1 parent 6fb0dfc commit b3b0812
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion changelogs/fragments/1162-do_not_update_ipmi_options.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bugfixes:
- zabbix_host - Don't reset IPMI setting when update inventory
- zabbix_host - Don't reset IPMI setting when update inventory data of a host
10 changes: 5 additions & 5 deletions plugins/modules/zabbix_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,13 @@ def update_host(self, host_name, group_ids, status, host_id, interfaces, exist_i
else:
# A "plain" host
parameters = {"hostid": host_id, "groups": group_ids, "status": status}
if proxy_id >= 0:
if (proxy_id >= 0 and proxy_id != zabbix_host_obj["proxy_hostid"]):
parameters["proxy_hostid"] = proxy_id
if (visible_name is not None and visible_name != zabbix_host_obj["name"]):
parameters["name"] = visible_name
if tls_connect:
if (tls_connect is not None and tls_connect != zabbix_host_obj["tls_connect"]):
parameters["tls_connect"] = tls_connect
if tls_accept:
if (tls_accept is not None and tls_accept != zabbix_host_obj["tls_accept"]):
parameters["tls_accept"] = tls_accept
if tls_psk_identity:
parameters["tls_psk_identity"] = tls_psk_identity
Expand All @@ -541,9 +541,9 @@ def update_host(self, host_name, group_ids, status, host_id, interfaces, exist_i
parameters["tls_subject"] = tls_subject
if (description is not None and description != zabbix_host_obj["description"]):
parameters["description"] = description
if ipmi_authtype:
if (ipmi_authtype is not None and ipmi_authtype != zabbix_host_obj["ipmi_authtype"]):
parameters["ipmi_authtype"] = ipmi_authtype
if ipmi_privilege:
if (ipmi_privilege is not None and ipmi_privilege != zabbix_host_obj["ipmi_privilege"]):
parameters["ipmi_privilege"] = ipmi_privilege
if (ipmi_username is not None and ipmi_username != zabbix_host_obj["ipmi_username"]):
parameters["ipmi_username"] = ipmi_username
Expand Down

0 comments on commit b3b0812

Please sign in to comment.