From 0188889aea7123d6338772edb8381a2a2714d4f0 Mon Sep 17 00:00:00 2001 From: Peter Sankauskas Date: Mon, 30 Jul 2012 12:51:29 -0700 Subject: [PATCH] Making inventory pattern matching handle group names --- lib/ansible/inventory/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py index 0de98b0fe6..eabf3684d1 100644 --- a/lib/ansible/inventory/__init__.py +++ b/lib/ansible/inventory/__init__.py @@ -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: