12cdd90633
Depends-On: I5846b48d336583ae82743f61bfbdadc99c755e8d Change-Id: Iaf15dad5e4d527b8721409e56fc081043c1cb174 Implements: blueprint vitrage-roles
33 lines
1000 B
YAML
33 lines
1000 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
|