made ip of db host dynamic.
This commit is contained in:
parent
ac78a1a272
commit
c17c6388a7
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Start a mariadb container to use its mysql client to initialize the keystone database.
|
# Start a mariadb container to use its mysql client to initialize the keystone database.
|
||||||
docker run -i mariadb:10.1.22 mysql -uroot -pgeheim --host 172.23.38.125 << EOF
|
docker run -i mariadb:10.1.22 mysql -uroot -pgeheim --host "$1" << EOF
|
||||||
CREATE DATABASE IF NOT EXISTS keystone;
|
CREATE DATABASE IF NOT EXISTS keystone;
|
||||||
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
|
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';
|
||||||
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';
|
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
state: started
|
state: started
|
||||||
|
|
||||||
- name: Initialize db
|
- name: Initialize db
|
||||||
script: scripts/initialize_db.sh
|
script: scripts/initialize_db.sh {{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
|
||||||
|
|
||||||
- name: keystone manage commands to setup db
|
- name: keystone manage commands to setup db
|
||||||
command: >
|
command: >
|
||||||
|
Loading…
Reference in New Issue
Block a user