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

Making inventory pattern matching handle group names

This commit is contained in:
Peter Sankauskas 2012-07-30 12:51:29 -07:00
parent d0f0315c9d
commit 0188889aea

View file

@ -105,7 +105,7 @@ class Inventory(object):
inverted = False
for group in groups:
for host in group.get_hosts():
if group.name == pat or pat == 'all' or self._match(host.name, pat):
if self._match(group.name, pat) or pat == 'all' or self._match(host.name, pat):
# must test explicitly for None because [] means no hosts allowed
if self._restriction==None or host.name in self._restriction:
if inverted: