mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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
This commit is contained in:
parent
0ac74aaf59
commit
e36a8d466e
1 changed files with 1 additions and 1 deletions
|
@ -348,7 +348,7 @@ class PlayBook(object):
|
||||||
def _trim_unavailable_hosts(self, hostlist=[]):
|
def _trim_unavailable_hosts(self, hostlist=[]):
|
||||||
''' returns a list of hosts that haven't failed and aren't dark '''
|
''' 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)]
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue