1
0
Fork 0
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:
James Tanner 2013-11-25 10:13:55 -05:00
parent 5c1fbcc9d2
commit 903c4cae7b

View file

@ -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):