Hii,
I'm using the 'until' loop to wait for a condition to be true:
It is not, I'm afraid. The controller will see the value of *status*
after the loop completes. (The condition is evaluated on the remote
host).
(The condition is evaluated on the remote
host).
No, conditions (as well as any templating) is always evaluated on the
controller, the caveat is that DATA for this evaluation might come
from the remote host. via `register:`.
Right. The *task_executor* takes care of this
https://github.com/ansible/ansible/blob/devel/lib/ansible/executor/task_executor.py#L775
I was too quick. The registered variable can be used in the label. If
the status of the task (changed) is available when the label is
displayed the registered variable should be available as well. For
example,
- command: "echo {{ item }}"
register: status
loop: [1, 2, 3, 4, 5]
loop_control:
label: "{{ status.stdout|int + 10 }}"
until: status.stdout|int < 4
delay: 1
gives
TASK [command]