Move database creation into role (horizon)
There is no record for why we implement the database creation outside of the role in the playbook, when we could do it inside the role. Implementing it inside the role allows us to reduce the quantity of group_vars duplicated from the role, and allows us to better document the required variables in the role. The delegation can still be done as it is done in the playbook too. In this patch we remove the group_vars which were duplicated from the role, and remove the DB setup tasks as they are no longer required. Change-Id: Ia82a6890da83e9fa384805e837b969d65cdc4abc Depends-On: https://review.openstack.org/571755
This commit is contained in:
parent
2d7b6ea770
commit
46e908d3f5
@ -17,6 +17,9 @@
|
||||
hosts: horizon_all
|
||||
gather_facts: "{{ osa_gather_facts | default(True) }}"
|
||||
user: root
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- horizon
|
||||
pre_tasks:
|
||||
- include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
|
||||
- include: common-tasks/os-log-dir-setup.yml
|
||||
@ -24,14 +27,7 @@
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-horizon"
|
||||
dest: "/var/log/horizon"
|
||||
- include: common-tasks/mysql-db-user.yml
|
||||
static: no
|
||||
vars:
|
||||
user_name: "{{ horizon_galera_user }}"
|
||||
password: "{{ horizon_container_mysql_password }}"
|
||||
login_host: "{{ horizon_galera_address }}"
|
||||
db_name: "{{ horizon_galera_database }}"
|
||||
when: inventory_hostname == groups['horizon_all'][0]
|
||||
|
||||
- include: common-tasks/unbound-clients.yml
|
||||
static: no
|
||||
when:
|
||||
@ -48,11 +44,3 @@
|
||||
rsyslog_client_log_rotate_file: horizon_log_rotate
|
||||
rsyslog_client_log_dir: "/var/log/horizon"
|
||||
rsyslog_client_config_name: "99-horizon-rsyslog-client.conf"
|
||||
|
||||
vars:
|
||||
horizon_galera_user: horizon
|
||||
horizon_galera_database: horizon
|
||||
horizon_galera_address: "{{ galera_address }}"
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- horizon
|
||||
|
Loading…
Reference in New Issue
Block a user