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

add changelogs
This commit is contained in:
sky-joker 2019-12-23 16:47:02 +09:00 committed by ansibot
parent 5e271baa55
commit 3caadca3f4
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -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: