4ca2d41762
Second part of patchset: https://review.opendev.org/c/openstack/kolla-ansible/+/799229/ in which was suggested to split patch into smaller ones. THis change adds container_engine to module parameters so when we introduce podman, kolla_toolbox can be used for both engines. Signed-off-by: Ivan Halomi <i.halomi@partner.samsung.com> Co-authored-by: Martin Hiner <m.hiner@partner.samsung.com> Change-Id: Ic2093aa9341a0cb36df8f340cf290d62437504ad
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
---
|
|
- name: Creating Nova cell database
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: mysql_db
|
|
module_args:
|
|
login_host: "{{ nova_cell_database_address }}"
|
|
login_port: "{{ nova_cell_database_port }}"
|
|
login_user: "{{ nova_cell_database_admin_user }}"
|
|
login_password: "{{ nova_cell_database_admin_password }}"
|
|
name: "{{ nova_cell_database_name }}"
|
|
when:
|
|
- not use_preconfigured_databases | bool
|
|
- inventory_hostname == groups[nova_cell_conductor_group][0]
|
|
|
|
- name: Creating Nova cell database user and setting permissions
|
|
become: true
|
|
kolla_toolbox:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
module_name: mysql_user
|
|
module_args:
|
|
login_host: "{{ nova_cell_database_address }}"
|
|
login_port: "{{ nova_cell_database_port }}"
|
|
login_user: "{{ nova_cell_database_admin_user }}"
|
|
login_password: "{{ nova_cell_database_admin_password }}"
|
|
name: "{{ nova_cell_database_user }}"
|
|
password: "{{ nova_cell_database_password }}"
|
|
host: "%"
|
|
priv: "{{ nova_cell_database_name }}.*:ALL"
|
|
append_privs: "yes"
|
|
when:
|
|
- not use_preconfigured_databases | bool
|
|
- inventory_hostname == groups[nova_cell_conductor_group][0]
|
|
no_log: true
|
|
|
|
- import_tasks: rabbitmq.yml
|
|
|
|
- import_tasks: config_bootstrap.yml
|
|
|
|
- import_tasks: bootstrap_service.yml
|
|
|
|
- import_tasks: create_cells.yml
|