diff --git a/lib/ansible/runner/__init__.py b/lib/ansible/runner/__init__.py index ae8016499cf..052ae642e2b 100644 --- a/lib/ansible/runner/__init__.py +++ b/lib/ansible/runner/__init__.py @@ -1034,7 +1034,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