mariadb container name variable

mariadb container name variable is fixed in some places,
but in the defaults directory, mariadb container_name variable
is variable. If the mariadb container_name variable is changed
during deployment, it will not be assigned to container_name,
but a fixed 'mariadb' name.

Change-Id: Ie8efa509953d5efa5c3073c9b550be051a7f4f9b
This commit is contained in:
LinPeiWen 2020-03-24 23:46:18 -04:00
parent 9bde29a30b
commit 8a206699d4
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
---
- name: Waiting for MariaDB service to be ready through VIP
become: true
command: "docker exec mariadb mysql -h {{ database_address }} -P {{ database_port }} -u haproxy -e 'show databases;'"
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

View File

@ -121,7 +121,7 @@
- name: Copying grastate.dat file to mariadb container
become: true
command: docker cp /tmp/kolla_mariadb_grastate.dat mariadb:/var/lib/mysql/grastate.dat
command: docker cp /tmp/kolla_mariadb_grastate.dat {{ mariadb_service.container_name }}:/var/lib/mysql/grastate.dat
changed_when: false
when:
- bootstrap_host is defined