This is the play:
- name: Waiting for MariaDB service to be ready command: "docker exec mariadb ls /var/lib/mysql/mariadb.pid" register: bootstrap_result when: delegate_host != 'None' or ( groups['mariadb'] | length ) == 1 or ( delegate_host == 'None' and inventory_hostname != groups['mariadb'][0] ) until: bootstrap_result|success changed_when: False retries: 6 delay: 10
I don't know if it is correct. Whatever the case is it looks flakey.
Another option for waiting for the MariaDB service to be ready is to use wait_for.
For example: local_action: wait_for port="{{mariadb_port}}" host="{{notsurewhattoputhere}}" search_regex=MariaDB timeout=60
This is the play:
- name: Waiting for MariaDB service to be ready mysql/mariadb. pid" 'mariadb' ][0] ) result| success
command: "docker exec mariadb ls /var/lib/
register: bootstrap_result
when: delegate_host != 'None' or
( groups['mariadb'] | length ) == 1 or
( delegate_host == 'None' and inventory_hostname != groups[
until: bootstrap_
changed_when: False
retries: 6
delay: 10
I don't know if it is correct. Whatever the case is it looks flakey.
Another option for waiting for the MariaDB service to be ready is to use wait_for.
For example: {mariadb_ port}}" host="{ {notsurewhattop uthere} }" search_ regex=MariaDB timeout=60
local_action: wait_for port="{