zabbix_host: fix https://github.com/ansible/ansible/issues/63449 (#63637)
This commit is contained in:
parent
f92c99b413
commit
aa671be28b
1 changed files with 4 additions and 4 deletions
|
@ -478,20 +478,20 @@ class Host(object):
|
||||||
if interfaces is not None:
|
if interfaces is not None:
|
||||||
if len(interfaces) >= 1:
|
if len(interfaces) >= 1:
|
||||||
for interface in interfaces:
|
for interface in interfaces:
|
||||||
interfaces_port_list.append(int(interface['port']))
|
interfaces_port_list.append(str(interface['port']))
|
||||||
|
|
||||||
exist_interface_ports = []
|
exist_interface_ports = []
|
||||||
if len(exist_interface_list) >= 1:
|
if len(exist_interface_list) >= 1:
|
||||||
for exist_interface in exist_interface_list:
|
for exist_interface in exist_interface_list:
|
||||||
exist_interface_ports.append(int(exist_interface['port']))
|
exist_interface_ports.append(str(exist_interface['port']))
|
||||||
|
|
||||||
if set(interfaces_port_list) != set(exist_interface_ports):
|
if set(interfaces_port_list) != set(exist_interface_ports):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for exist_interface in exist_interface_list:
|
for exist_interface in exist_interface_list:
|
||||||
exit_interface_port = int(exist_interface['port'])
|
exit_interface_port = str(exist_interface['port'])
|
||||||
for interface in interfaces:
|
for interface in interfaces:
|
||||||
interface_port = int(interface['port'])
|
interface_port = str(interface['port'])
|
||||||
if interface_port == exit_interface_port:
|
if interface_port == exit_interface_port:
|
||||||
for key in interface.keys():
|
for key in interface.keys():
|
||||||
if str(exist_interface[key]) != str(interface[key]):
|
if str(exist_interface[key]) != str(interface[key]):
|
||||||
|
|
Loading…
Reference in a new issue