Commit 489844f9 by Michael DeHaan

Merge pull request #1095 from pas256/devel

Getting negative host pattern matching to work with external inventory
parents 5530d771 8a4e969b
......@@ -109,8 +109,8 @@ class Inventory(object):
# exclude hosts mentioned in a negative pattern
if len(negative_patterns):
exclude_hosts = self._get_hosts(negative_patterns)
hosts = [ h for h in hosts if h not in exclude_hosts ]
exclude_hosts = [ h.name for h in self._get_hosts(negative_patterns) ]
hosts = [ h for h in hosts if h.name not in exclude_hosts ]
# exclude hosts not in a subset, if defined
if self._subset:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment