Skip to content

Commit

Permalink
Allow retries to be templatable
Browse files Browse the repository at this point in the history
  • Loading branch information
jszwedko committed Dec 10, 2014
1 parent ac71caa commit 4624712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ansible/runner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ def _executor_internal_inner(self, host, module_name, module_args, inject, port,

cond = template.template(self.basedir, until, inject, expand_lists=False)
if not utils.check_conditional(cond, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars):
retries = self.module_vars.get('retries')
retries = template.template(self.basedir, self.module_vars.get('retries'), inject, expand_lists=False)
delay = self.module_vars.get('delay')
for x in range(1, int(retries) + 1):
# template the delay, cast to float and sleep
Expand Down

0 comments on commit 4624712

Please sign in to comment.