From 462471209ec93a4aa4d284b1f3b06cf93de1693c Mon Sep 17 00:00:00 2001 From: jszwedko Date: Wed, 10 Dec 2014 16:54:58 -0500 Subject: [PATCH] Allow retries to be templatable Fixes #5865 --- lib/ansible/runner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index 47c1faadebc..7912d234621 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -1030,7 +1030,7 @@ class Runner(object): 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