I have an executable, lets say /tmp/foo
I want to try to run (5 times at most) this binary file until I see a line in a log file: lets say /tmp/start.log
I need such kind of a play:
- block:
- shell: /tmp/foo
- pause: seconds=30
- name: Check if started successfully
shell: grep 'started successfully' /tmp/start.log
register: grep
retry: 5
until: grep.stdout
But unfortunately Ansible block does not support retry-until.
How can I achieve this?