diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index 4103055ba6..69fe00800f 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -32,7 +32,18 @@ bootstrap_host_user_variables_filename: "user_variables.yml" bootstrap_host_user_secrets_filename: "user_secrets.yml" # The user variables template to use -bootstrap_user_variables_template: "user_variables.{{ bootstrap_host_scenario }}.yml.j2" +bootstrap_user_variables_template: user_variables.aio.yml.j2 + +# Extra user variables files can be loaded into /etc/openstack_deploy by +# test scenarios. The dict uses scenario as the key to load a list of extra +# templates if necessary. +bootstrap_user_variables_extra_templates: + ceph: + - src: user_variables_ceph.yml.j2 + dest: user_variables_ceph.yml + translations: + - src: user_variables_translations.yml.j2 + dest: user_variables_translations.yml ## Swap memory # If there is no swap memory present, the bootstrap will create a loopback disk diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index 0ae3fce1ac..b33fa6520f 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -131,6 +131,14 @@ config_overrides: "{{ user_variables_overrides | default({}) }}" config_type: yaml +- name: Drop the extra user_variables files for this scenario + config_template: + src: "{{ item.src }}" + dest: "/etc/openstack_deploy/{{ item.dest }}" + config_overrides: "{{ item.config_overrides | default({}) }}" + config_type: yaml + with_items: "{{ bootstrap_user_variables_extra_templates[bootstrap_host_scenario] | default([]) }}" + - name: Add user_conf_files to contain the list of files to copy into containers file: path: /etc/openstack_deploy/user_conf_files.yml diff --git a/tests/roles/bootstrap-host/templates/user_variables.ceph.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.ceph.yml.j2 deleted file mode 100644 index 212f2ad7c8..0000000000 --- a/tests/roles/bootstrap-host/templates/user_variables.ceph.yml.j2 +++ /dev/null @@ -1,16 +0,0 @@ -{% include 'user_variables.aio.yml.j2' %} - -## ceph-ansible AIO settings -common_single_host_mode: true -monitor_interface: eth1 # Management network in the AIO -public_network: "{{ (mgmt_range ~ '.0/' ~ netmask) | ipaddr('net') }}" -journal_size: 100 -journal_collocation: true -pool_default_pg_num: 32 -openstack_config: true # Ceph ansible automatically creates pools & keys -cinder_ceph_client: cinder -cinder_default_volume_type: RBD -glance_ceph_client: glance -glance_default_store: rbd -glance_rbd_store_pool: images -nova_libvirt_images_rbd_pool: vms diff --git a/tests/roles/bootstrap-host/templates/user_variables.translations.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.translations.yml.j2 deleted file mode 100644 index 7b1f609ee0..0000000000 --- a/tests/roles/bootstrap-host/templates/user_variables.translations.yml.j2 +++ /dev/null @@ -1,9 +0,0 @@ -{% include 'user_variables.aio.yml.j2' %} - -# Trove settings for translations site. -trove_provider_net_name: flat-db -trove_service_net_phys_net: flat-db -trove_service_net_setup: True -trove_service_net_subnet_cidr: "172.29.232.0/22" -trove_service_net_allocation_pool_start: "172.29.233.110" -trove_service_net_allocation_pool_end: "172.29.233.200" diff --git a/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 new file mode 100644 index 0000000000..b95dd28a39 --- /dev/null +++ b/tests/roles/bootstrap-host/templates/user_variables_ceph.yml.j2 @@ -0,0 +1,29 @@ +--- +# Copyright 2017, Logan Vig +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +## ceph-ansible AIO settings +common_single_host_mode: true +monitor_interface: eth1 # Management network in the AIO +public_network: "{{ (mgmt_range ~ '.0/' ~ netmask) | ipaddr('net') }}" +journal_size: 100 +journal_collocation: true +pool_default_pg_num: 32 +openstack_config: true # Ceph ansible automatically creates pools & keys +cinder_ceph_client: cinder +cinder_default_volume_type: RBD +glance_ceph_client: glance +glance_default_store: rbd +glance_rbd_store_pool: images +nova_libvirt_images_rbd_pool: vms diff --git a/tests/roles/bootstrap-host/templates/user_variables_translations.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_translations.yml.j2 new file mode 100644 index 0000000000..82cf37038b --- /dev/null +++ b/tests/roles/bootstrap-host/templates/user_variables_translations.yml.j2 @@ -0,0 +1,22 @@ +--- +# Copyright 2017, Logan Vig +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Trove settings for translations site. +trove_provider_net_name: flat-db +trove_service_net_phys_net: flat-db +trove_service_net_setup: True +trove_service_net_subnet_cidr: "172.29.232.0/22" +trove_service_net_allocation_pool_start: "172.29.233.110" +trove_service_net_allocation_pool_end: "172.29.233.200"