Merge branch 'v2_fixing' into devel

Conflicts:
	v2/ansible/playbook/helpers.py
This commit is contained in:
James Cammarata
2015-04-02 01:25:53 -05:00
34 changed files with 505 additions and 426 deletions

View File

@@ -238,10 +238,14 @@ class TaskExecutor:
if self._task.poll > 0:
result = self._poll_async_result(result=result)
# update the local copy of vars with the registered value, if specified
# update the local copy of vars with the registered value, if specified,
# or any facts which may have been generated by the module execution
if self._task.register:
vars_copy[self._task.register] = result
if 'ansible_facts' in result:
vars_copy.update(result['ansible_facts'])
# create a conditional object to evaluate task conditions
cond = Conditional(loader=self._loader)
@@ -267,6 +271,15 @@ class TaskExecutor:
if attempt < retries - 1:
time.sleep(delay)
# do the final update of the local variables here, for both registered
# values and any facts which may have been created
if self._task.register:
variables[self._task.register] = result
if 'ansible_facts' in result:
variables.update(result['ansible_facts'])
# and return
debug("attempt loop complete, returning result")
return result