Hi,
I’m trying to use this (simplified) playbook:
- name: Hamlet check
hosts: hamletnodes
sudo: true
vars:
appname: hamlet
svcname: “/etc/service/{{appname}}”
tasks:
- name: Wait for service to come down
action: shell /usr/bin/svstat {{svcdir}}
register: result
until: result.stdout.find(’ down ') != -1
However when running it I get the following error:
ERROR: until is not a legal parameter in an Ansible task or handler
This is pretty much copied straight from the loop documentation. Has this been removed?
Thanks,
Steve
Nope!
Do-until loops are available in the development branch, but for some reason the “version added” attribute isn’t shown. I suspect this is a formatting error in the documentation metadata, and will fix this. Sorry about that, I can see where that would be frustrating.
You will need to be using the devel branch to use the until loop feature.
Thanks Michael,
Is until: expected to make it into the next release?
Cheers,
Steve
Yes, it’s already in the next release.
The documentation will be marked up correctly in the next docs push, which will be soon.