blob: f71ad37a52b993e1579544e35fb2ef261b21c05e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
---
- name: Starting mariadb container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ mariadb_image_full }}"
name: "mariadb"
volumes:
- "{{ node_config_directory }}/mariadb/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "mariadb:/var/lib/mysql"
- "kolla_logs:/var/log/kolla/"
when: delegate_host != 'None' or
( groups['mariadb'] | length ) == 1 or
( delegate_host == 'None' and mariadb_recover_inventory_name is not defined and inventory_hostname != groups['mariadb'][0] ) or
( delegate_host == 'None' and mariadb_recover_inventory_name is defined and inventory_hostname != mariadb_recover_inventory_name )
# TODO(jeffrey4l), remove the task check when the wair_for bug is fixed
# https://github.com/ansible/ansible-modules-core/issues/2788
- name: Waiting for MariaDB service to be ready
wait_for:
host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}"
port: "{{ mariadb_port }}"
connect_timeout: 1
timeout: 60
search_regex: "MariaDB"
register: check_mariadb_port
until: check_mariadb_port | success
retries: 10
delay: 6
|