2d1a1b1df6
Co-Authored-By: caoyuan <cao.yuan@99cloud.net> Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com> Depends-on I7ffb991adbd05275e331401cd73fc84362084ebd Change-Id: I85afeb5dfce0bf6350a444000bdb885c6fe079c9 Partially-implements: blueprint vitrage-roles
34 lines
1001 B
YAML
34 lines
1001 B
YAML
---
|
|
- name: Creating vitrage database
|
|
kolla_toolbox:
|
|
module_name: mysql_db
|
|
module_args:
|
|
login_host: "{{ database_address }}"
|
|
login_port: "{{ database_port }}"
|
|
login_user: "{{ database_user }}"
|
|
login_password: "{{ database_password }}"
|
|
name: "{{ vitrage_database_name }}"
|
|
register: database
|
|
run_once: True
|
|
delegate_to: "{{ groups['vitrage-api'][0] }}"
|
|
|
|
- name: Creating vitrage database user and setting permissions
|
|
kolla_toolbox:
|
|
module_name: mysql_user
|
|
module_args:
|
|
login_host: "{{ database_address }}"
|
|
login_port: "{{ database_port }}"
|
|
login_user: "{{ database_user }}"
|
|
login_password: "{{ database_password }}"
|
|
name: "{{ vitrage_database_user }}"
|
|
password: "{{ vitrage_database_password }}"
|
|
host: "%"
|
|
priv: "{{ vitrage_database_name }}.*:ALL"
|
|
append_privs: "yes"
|
|
run_once: True
|
|
delegate_to: "{{ groups['vitrage-api'][0] }}"
|
|
|
|
- include: bootstrap_service.yml
|
|
when: database.changed
|
|
|