Move database creation into role (heat)

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 test-vars which were duplicated from the
role, and remove the DB setup tasks as they are no longer required.

Change-Id: Ifc869c4940b22ebce233ead7a8993f30f8328bcd
Depends-On: https://review.openstack.org/571741
This commit is contained in:
Jesse Pretorius 2018-06-01 15:41:15 +01:00
parent 287c890584
commit f3faf5f7fa
2 changed files with 1 additions and 7 deletions

View File

@ -40,10 +40,7 @@
- "'oslomsg_rpc_all' in groups"
- "groups['oslomsg_rpc_all'] | length > 0"
- include: create-grant-db.yml
db_name: "{{ heat_galera_database }}"
db_password: "{{ heat_container_mysql_password }}"
roles:
- role: "{{ heat_rolename | default('os_heat') }}"
- role: "os_heat"
vars_files:
- test-vars.yml

View File

@ -409,9 +409,6 @@ heat_service_password: secrete
heat_stack_domain_admin_password: secrete
heat_auth_encryption_key: 32characterslongboguskeyvaluefoo
heat_container_mysql_password: "SuperSecrete"
heat_galera_address: "{{ test_galera_host }}"
heat_galera_user: heat
heat_galera_database: heat
heat_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
heat_oslomsg_rpc_userid: heat
heat_oslomsg_rpc_vhost: /heat