Skip to content

Commit

Permalink
check for situation where port was not provided at all in host interf…
Browse files Browse the repository at this point in the history
…aces
  • Loading branch information
D3DeFi authored and sky-joker committed May 19, 2020
1 parent 4ac825f commit 3c91db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/modules/zabbix_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ def construct_host_interfaces(self, interfaces):
if interface['type'] == 1:
ip = interface.get('ip', '')

if 'port' not in interface:
if 'port' not in interface or interface['port'] is None:
interface['port'] = type_to_port.get(interface['type'], '')

if LooseVersion(self._zbx_api_version) >= LooseVersion('5.0.0'):
Expand Down

0 comments on commit 3c91db1

Please sign in to comment.