From 9cbab7594da3f6f1aedba1de88a880708fa5d663 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 1 Jun 2018 16:06:39 +0100 Subject: [PATCH] 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 --- test-install-ironic.yml | 5 +---- test-vars.yml | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/test-install-ironic.yml b/test-install-ironic.yml index 08bbc464..5e0dc50a 100644 --- a/test-install-ironic.yml +++ b/test-install-ironic.yml @@ -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 diff --git a/test-vars.yml b/test-vars.yml index 16558e3f..622cd5fc 100644 --- a/test-vars.yml +++ b/test-vars.yml @@ -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