Minor pep8 cleanup and CHANGELOG update for do-until
This commit is contained in:
parent
202c4f5294
commit
994dfb84fc
2 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@ Ansible Changes By Release
|
||||||
|
|
||||||
Highlighted new features:
|
Highlighted new features:
|
||||||
|
|
||||||
|
* Added do-until feature, which can be used to retry a failed task a specified number of times with a delay in-between the retries.
|
||||||
* (docs pending) Added failed_when option for tasks, which can be used to specify logical statements that make it easier to determine when a task has failed, or to make it easier to ignore certain non-zero return codes for some commands.
|
* (docs pending) Added failed_when option for tasks, which can be used to specify logical statements that make it easier to determine when a task has failed, or to make it easier to ignore certain non-zero return codes for some commands.
|
||||||
* (docs pending) Added the "subelement" lookup plugin, which allows iteration of the keys of a dictionary or items in a list.
|
* (docs pending) Added the "subelement" lookup plugin, which allows iteration of the keys of a dictionary or items in a list.
|
||||||
* Added the capability to use either paramiko or ssh for the inital setup connection of an accelerated playbook.
|
* Added the capability to use either paramiko or ssh for the inital setup connection of an accelerated playbook.
|
||||||
|
|
|
@ -675,11 +675,11 @@ class Runner(object):
|
||||||
result.result['attempts'] = x
|
result.result['attempts'] = x
|
||||||
vv("Result from run %i is: %s" % (x, result.result))
|
vv("Result from run %i is: %s" % (x, result.result))
|
||||||
if not result.comm_ok:
|
if not result.comm_ok:
|
||||||
break;
|
break
|
||||||
inject[self.module_vars.get('register')] = result.result
|
inject[self.module_vars.get('register')] = result.result
|
||||||
cond = template.template(self.basedir, until, inject, expand_lists=False)
|
cond = template.template(self.basedir, until, inject, expand_lists=False)
|
||||||
if utils.check_conditional(cond, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars):
|
if utils.check_conditional(cond, self.basedir, inject, fail_on_undefined=self.error_on_undefined_vars):
|
||||||
break;
|
break
|
||||||
else:
|
else:
|
||||||
result.result['attempts'] = 0
|
result.result['attempts'] = 0
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
Loading…
Reference in a new issue