mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #12194 from amenonsen/dupe-fix
Remove duplicated function definition (fallout from earlier repeated merge)
This commit is contained in:
commit
e8d7fafc52
1 changed files with 0 additions and 17 deletions
|
@ -204,23 +204,6 @@ class Inventory(object):
|
||||||
|
|
||||||
return hosts
|
return hosts
|
||||||
|
|
||||||
def _split_pattern(self, pattern):
|
|
||||||
"""
|
|
||||||
takes e.g. "webservers[0:5]:dbservers:others"
|
|
||||||
and returns ["webservers[0:5]", "dbservers", "others"]
|
|
||||||
"""
|
|
||||||
|
|
||||||
term = re.compile(
|
|
||||||
r'''(?: # We want to match something comprising:
|
|
||||||
[^:\[\]] # (anything other than ':', '[', or ']'
|
|
||||||
| # ...or...
|
|
||||||
\[[^\]]*\] # a single complete bracketed expression)
|
|
||||||
)* # repeated as many times as possible
|
|
||||||
''', re.X
|
|
||||||
)
|
|
||||||
|
|
||||||
return [x for x in term.findall(pattern) if x]
|
|
||||||
|
|
||||||
def _evaluate_patterns(self, patterns):
|
def _evaluate_patterns(self, patterns):
|
||||||
"""
|
"""
|
||||||
Takes a list of patterns and returns a list of matching host names,
|
Takes a list of patterns and returns a list of matching host names,
|
||||||
|
|
Loading…
Reference in a new issue