mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Fix inventory.get_hosts when hosts is a list.
This commit is contained in:
@@ -96,7 +96,9 @@ class Inventory(object):
|
||||
applied subsets.
|
||||
"""
|
||||
|
||||
# process patterns
|
||||
# process patterns
|
||||
if isinstance(pattern, list):
|
||||
pattern = ';'.join(pattern)
|
||||
patterns = pattern.replace(";",":").split(":")
|
||||
positive_patterns = [ p for p in patterns if not p.startswith("!") ]
|
||||
negative_patterns = [ p for p in patterns if p.startswith("!") ]
|
||||
|
||||
Reference in New Issue
Block a user