mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
08fcf0346b
commit
ab8bacdf5e
1 changed files with 3 additions and 2 deletions
|
@ -87,11 +87,12 @@ def split_host_pattern(pattern):
|
|||
|
||||
if isinstance(pattern, list):
|
||||
return list(itertools.chain(*map(split_host_pattern, pattern)))
|
||||
elif not isinstance(pattern, string_types):
|
||||
pattern = to_native(pattern)
|
||||
|
||||
# If it's got commas in it, we'll treat it as a straightforward
|
||||
# comma-separated list of patterns.
|
||||
|
||||
elif ',' in pattern:
|
||||
if ',' in pattern:
|
||||
patterns = re.split('\s*,\s*', pattern)
|
||||
|
||||
# If it doesn't, it could still be a single pattern. This accounts for
|
||||
|
|
Loading…
Reference in a new issue