mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #5031 Template the delay value and cast to float for loops
This commit is contained in:
parent
5c1fbcc9d2
commit
903c4cae7b
1 changed files with 3 additions and 0 deletions
|
@ -692,6 +692,9 @@ class Runner(object):
|
|||
retries = self.module_vars.get('retries')
|
||||
delay = self.module_vars.get('delay')
|
||||
for x in range(1, retries + 1):
|
||||
# template the delay, cast to float and sleep
|
||||
delay = template.template(self.basedir, delay, inject, expand_lists=False)
|
||||
delay = float(delay)
|
||||
time.sleep(delay)
|
||||
tmp = ''
|
||||
if getattr(handler, 'NEEDS_TMPPATH', True):
|
||||
|
|
Loading…
Add table
Reference in a new issue