Include groups in name-based search results (#66026)

add changelogs
pull/66276/head
sky-joker 5 years ago committed by ansibot
parent 5e271baa55
commit 3caadca3f4

@ -0,0 +1,2 @@
minor_changes:
- zabbix_host_info - ``host_name`` based search results now include host groups.

@ -120,7 +120,7 @@ class Host(object):
if exact_match:
search_key = 'filter'
host_list = self._zapi.host.get({'output': 'extend', 'selectParentTemplates': ['name'], search_key: {'host': [host_name]},
'selectInventory': host_inventory})
'selectInventory': host_inventory, 'selectGroups': 'extend'})
if len(host_list) < 1:
self._module.fail_json(msg="Host not found: %s" % host_name)
else:

Loading…
Cancel
Save