1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Exclude the all/ungrouped groups from pattern matching results

Fixes #5375
This commit is contained in:
James Cammarata 2015-06-17 16:25:58 -04:00
parent 90445ee67d
commit 87ca475704

View file

@ -364,7 +364,7 @@ class Inventory(object):
for host in group.get_hosts():
__append_host_to_results(host)
else:
if self._match(group.name, pattern):
if self._match(group.name, pattern) and group.name not in ('all', 'ungrouped'):
for host in group.get_hosts():
__append_host_to_results(host)
else: