mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Change the retry logic to write a limit file, able to source limit from files by indicating with @filename
This commit is contained in:
parent
c695aa2d6a
commit
0d530f3bf0
3 changed files with 25 additions and 67 deletions
|
@ -330,7 +330,17 @@ class Inventory(object):
|
|||
self._subset = None
|
||||
else:
|
||||
subset_pattern = subset_pattern.replace(',',':')
|
||||
self._subset = subset_pattern.replace(";",":").split(":")
|
||||
subset_pattern = subset_pattern.replace(";",":").split(":")
|
||||
results = []
|
||||
# allow Unix style @filename data
|
||||
for x in subset_pattern:
|
||||
if x.startswith("@"):
|
||||
fd = open(x[1:])
|
||||
results.extend(fd.read().split("\n"))
|
||||
fd.close()
|
||||
else:
|
||||
results.append(x)
|
||||
self._subset = results
|
||||
|
||||
def lift_restriction(self):
|
||||
""" Do not restrict list operations """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue