--- - name: Waiting for MariaDB service to be ready through VIP become: true command: "docker exec {{ mariadb_service.container_name }} mysql -h {{ database_address }} -P {{ database_port }} -u haproxy -e 'show databases;'" register: result until: result is success changed_when: False retries: 6 delay: 10