summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cammarata <jimi@sngx.net>2016-05-12 09:52:00 -0400
committerJames Cammarata <jimi@sngx.net>2016-05-12 09:52:00 -0400
commit64a738ce5108c60922c8ceacd9cf8eabe37fbd6f (patch)
tree1b765e5189dcef5ee24b05bdf58cbc58cac76808
parent0d7530e6daad519df6c6b421ad457b2d6c8573c8 (diff)
parent3439bcc744e0201a8c5c6cd4e157130a798ccaab (diff)
downloadansible-64a738ce5108c60922c8ceacd9cf8eabe37fbd6f.tar.gz
Merge branch 'zenbot-refresh-inventory-exit' into devel
-rw-r--r--lib/ansible/inventory/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/inventory/__init__.py b/lib/ansible/inventory/__init__.py
index 4797b6977f..abb8b0b082 100644
--- a/lib/ansible/inventory/__init__.py
+++ b/lib/ansible/inventory/__init__.py
@@ -204,7 +204,7 @@ class Inventory(object):
# exclude hosts mentioned in any restriction (ex: failed hosts)
if self._restriction is not None:
- hosts = [ h for h in hosts if h in self._restriction ]
+ hosts = [ h for h in hosts if h.name in self._restriction ]
seen = set()
HOSTS_PATTERNS_CACHE[pattern_hash] = [x for x in hosts if x not in seen and not seen.add(x)]
@@ -600,7 +600,7 @@ class Inventory(object):
return
elif not isinstance(restriction, list):
restriction = [ restriction ]
- self._restriction = restriction
+ self._restriction = [ h.name for h in restriction ]
def subset(self, subset_pattern):
"""