Move database creation into role (ironic)

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: I1a6e887142e2144f483be79bb203ecc4423c2338
Depends-On: https://review.openstack.org/571759
This commit is contained in:
Jesse Pretorius 2018-06-01 16:06:39 +01:00
parent 287c890584
commit 9cbab7594d
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: "{{ ironic_galera_database }}"
db_password: "{{ ironic_container_mysql_password }}"
roles:
- role: "{{ ironic_rolename | default('os_ironic') }}"
- role: "os_ironic"
vars_files:
- test-vars.yml

View File

@ -459,9 +459,6 @@ ironic_service_internalurl: "{{ ironic_service_internaluri }}"
ironic_service_password: "secrete"
ironic_service_name: ironic
ironic_service_project_name: "service"
ironic_galera_address: "{{ test_galera_host }}"
ironic_galera_database: ironic
ironic_galera_user: ironic
ironic_container_mysql_password: "secrete"
ironic_oslomsg_rpc_password: "{{ oslomsg_rpc_password }}"
ironic_oslomsg_rpc_userid: ironic