Skip to content

Commit

Permalink
Making inventory pattern matching handle group names
Browse files Browse the repository at this point in the history
  • Loading branch information
pas256 committed Jul 30, 2012
1 parent d0f0315 commit 0188889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/inventory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def get_hosts(self, pattern="all"):
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:
Expand Down

0 comments on commit 0188889

Please sign in to comment.