10bf6b05fa
This change defaults freezer to use mariadb as default backend for database and adds elasticsearch as an optional backend due to the requirement of freezer to use elasticsearch version 2.3.0. The default elasticsearch in kolla-ansible is 5.6.x and that doesn't work with freezer. Added needed options to the elasticsearch backend like: - protocol - address - port - number of replicas Change-Id: I88616c285bdb297fd1f738846ddffe1b08a7a827 Signed-off-by: Marek Svensson <marek@marex.st>
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
---
|
|
- name: Creating Freezer 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: "{{ freezer_database_name }}"
|
|
become: true
|
|
register: database
|
|
run_once: True
|
|
delegate_to: "{{ groups['freezer-api'][0] }}"
|
|
when:
|
|
- not use_preconfigured_databases | bool
|
|
|
|
- name: Creating Freezer 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: "{{ freezer_database_user }}"
|
|
password: "{{ freezer_database_password }}"
|
|
host: "%"
|
|
priv: "{{ freezer_database_name }}.*:ALL"
|
|
append_privs: "yes"
|
|
become: true
|
|
run_once: True
|
|
delegate_to: "{{ groups['freezer-api'][0] }}"
|
|
when:
|
|
- not use_preconfigured_databases | bool
|
|
|
|
- include_tasks: bootstrap_service.yml
|
|
when: database.changed or use_preconfigured_databases | bool
|