added , back to inventory spliting
This commit is contained in:
parent
5eeb4ef2b6
commit
ab18fd2171
1 changed files with 4 additions and 3 deletions
|
@ -174,15 +174,16 @@ class Inventory(object):
|
|||
return results
|
||||
|
||||
def get_hosts(self, pattern="all"):
|
||||
"""
|
||||
"""
|
||||
find all host names matching a pattern string, taking into account any inventory restrictions or
|
||||
applied subsets.
|
||||
"""
|
||||
|
||||
# process patterns
|
||||
if isinstance(pattern, list):
|
||||
pattern = ';'.join(pattern)
|
||||
patterns = pattern.replace(";",":").split(":")
|
||||
patterns = pattern
|
||||
else:
|
||||
patterns = pattern.replace(";",":").replace(",",":").split(":")
|
||||
hosts = self._get_hosts(patterns)
|
||||
|
||||
# exclude hosts not in a subset, if defined
|
||||
|
|
Loading…
Reference in a new issue