tests/image_prep/roles/container_wait/tasks/main.yml
raw| 1 | - name: Wait for containers |
| 2 | # Can't use wait_for_connection yet, not all base images have a python |
| 3 | command: >- |
| 4 | docker inspect |
| 5 | --format "{% raw %}{{.State.Running}}{% endraw %}" |
| 6 | "{{ inventory_hostname }}" |
| 7 | register: container_inspect_result |
| 8 | retries: 5 |
| 9 | delay: 10 |
| 10 | until: |
| 11 | - container_inspect_result is succeeded |
| 12 | - container_inspect_result.stdout == "true" |
| 13 | changed_when: false |
| 14 | delegate_to: localhost |