
Useful api_interface_address variable has been define here: https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L57 In order to simplify codebase we must use it as much as possible. Change-Id: I18fec19bf69e05a22a4142a9cd1165eccd022455
32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
YAML
---
|
|
- 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: "{{ api_interface_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
|