diff options
author | James Cammarata <jimi@sngx.net> | 2014-05-19 16:39:47 -0500 |
---|---|---|
committer | James Cammarata <jimi@sngx.net> | 2014-05-23 15:28:42 -0500 |
commit | a75a84b44aaeeeb60b870e6918959153cdb2189e (patch) | |
tree | 886921549a3beb5c931bdfb79bcdaace086be991 | |
parent | f132e99b2a2d9f50b30446d76ba08f8b659b89b8 (diff) | |
download | ansible-a75a84b44aaeeeb60b870e6918959153cdb2189e.tar.gz |
Don't re-query inventory when trimming failed/dark hosts
Since the filter list contains hosts, passing that back to list_hosts()
in the inventoy causes issues when the hostname is an IPv6 address
(with :'s interpreted as group unions). Since we already have the list
of hosts, we should not need to pass that back through inventory a
second time.
Fixes #7446
-rw-r--r-- | lib/ansible/playbook/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/playbook/__init__.py b/lib/ansible/playbook/__init__.py index 525e10efec..5eba7745c8 100644 --- a/lib/ansible/playbook/__init__.py +++ b/lib/ansible/playbook/__init__.py @@ -348,7 +348,7 @@ class PlayBook(object): def _trim_unavailable_hosts(self, hostlist=[]): ''' returns a list of hosts that haven't failed and aren't dark ''' - return [ h for h in self.inventory.list_hosts(hostlist) if (h not in self.stats.failures) and (h not in self.stats.dark)] + return [ h for h in hostlist if (h not in self.stats.failures) and (h not in self.stats.dark)] # ***************************************************** |