diff --git a/playbooks/ceph-install.yml b/playbooks/ceph-install.yml index 5f1b7b6d9a..ff066886b4 100644 --- a/playbooks/ceph-install.yml +++ b/playbooks/ceph-install.yml @@ -23,9 +23,12 @@ hosts: ceph-mon user: root gather_facts: false - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true - name: Gather additional facts for monitor_address_block include_tasks: "common-tasks/gather-hardware-facts.yml" @@ -131,9 +134,12 @@ hosts: ceph-osd user: root gather_facts: false - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true - name: Gather memory facts include_tasks: "common-tasks/gather-hardware-facts.yml" @@ -188,9 +194,13 @@ hosts: ceph-mds gather_facts: false user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Gather memory facts include_tasks: "common-tasks/gather-hardware-facts.yml" vars: diff --git a/playbooks/ceph-nfs-install.yml b/playbooks/ceph-nfs-install.yml index dfdaad41ac..38fe3d5064 100644 --- a/playbooks/ceph-nfs-install.yml +++ b/playbooks/ceph-nfs-install.yml @@ -23,9 +23,13 @@ hosts: ceph-nfs gather_facts: false user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Gather ceph-mon facts action: setup delegate_to: "{{ item }}" diff --git a/playbooks/ceph-rgw-install.yml b/playbooks/ceph-rgw-install.yml index 58b04fbeb5..aa4a1a770b 100644 --- a/playbooks/ceph-rgw-install.yml +++ b/playbooks/ceph-rgw-install.yml @@ -27,9 +27,12 @@ hosts: ceph-rgw gather_facts: false user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true - name: Importing ceph-server tasks import_tasks: common-tasks/ceph-server.yml diff --git a/playbooks/ceph-rgw-keystone-setup.yml b/playbooks/ceph-rgw-keystone-setup.yml index 50d25eca06..e25bf12441 100644 --- a/playbooks/ceph-rgw-keystone-setup.yml +++ b/playbooks/ceph-rgw-keystone-setup.yml @@ -16,8 +16,6 @@ - name: Configure keystone for radosgw hosts: "{{ openstack_service_setup_host | default('localhost') }}" user: root - vars_files: - - "defaults/{{ install_method | default('source') }}_install.yml" vars: ansible_python_interpreter: >- {{ openstack_service_setup_host_python_interpreter | @@ -28,6 +26,11 @@ - ceph-rgw-setup - rgw-service-add tasks: + - name: Setup installation variables + import_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method | default('source') }}" + - name: Add service to the keystone service catalog openstack.cloud.catalog_service: cloud: default diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 4334b1a2c7..f2de6b9d1c 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -19,9 +19,12 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "../defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index af35e2a493..ce67d90fc1 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -19,9 +19,12 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "../defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service diff --git a/playbooks/containers-lxc-create.yml b/playbooks/containers-lxc-create.yml index aae8a5af91..3eb2daa8d1 100644 --- a/playbooks/containers-lxc-create.yml +++ b/playbooks/containers-lxc-create.yml @@ -16,9 +16,13 @@ - name: Set lxc containers group hosts: "{{ container_group | default('all_containers') }}" gather_facts: false - vars_files: - - "defaults/{{ install_method }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Add hosts to dynamic inventory group group_by: key: lxc_containers @@ -39,11 +43,15 @@ hosts: all_lxc_containers user: root gather_facts: false - vars_files: - - "defaults/{{ install_method }}_install.yml" environment: "{{ deployment_environment_variables | default({}) }}" tags: - lxc-containers-create + pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true roles: - role: "lxc_container_create" post_tasks: @@ -67,11 +75,15 @@ hosts: all_lxc_containers user: root gather_facts: false - vars_files: - - "defaults/{{ install_method }}_install.yml" environment: "{{ deployment_environment_variables | default({}) }}" tags: - lxc-containers-create + pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true roles: - role: "openstack_hosts" is_container: true diff --git a/playbooks/containers-lxc-host.yml b/playbooks/containers-lxc-host.yml index 7be88c8a20..b1cb29ba8a 100644 --- a/playbooks/containers-lxc-host.yml +++ b/playbooks/containers-lxc-host.yml @@ -24,12 +24,16 @@ user: root gather_facts: false serial: "{{ lxc_hosts_serial | default(['100%']) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" environment: "{{ deployment_environment_variables | default({}) }}" tags: - lxc-hosts pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Check the state of the default LXC service log directory stat: path: "/var/log/lxc" diff --git a/playbooks/defaults/distro_install.yml b/playbooks/defaults/distro_install.yml deleted file mode 100644 index 719642dd77..0000000000 --- a/playbooks/defaults/distro_install.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Copyright 2018, SUSE LINUX GmbH. -# -# 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. - -# -# Use $role_install_method=distro so we can test the combined -# result. We add all the os_* roles here even though some of them -# may not have been converted to support the dual installation method. -# -# NOTE(hwoarang): We need to define the various $role_bin variables because -# some playbooks in this repository are explicitly using them to perform -# post deployment actions such as the playbooks/os-{cinder,keystone,nova}-install.yml -# playbooks. -# - -keystone_bin: /usr/bin -cinder_bin: /usr/bin -nova_bin: /usr/bin -neutron_bin: /usr/bin - -## Delegate all database setup tasks to the utility host, and use the utility venv python interpreter -openstack_db_setup_host: "{{ groups['utility_all'][0] }}" -openstack_db_setup_python_interpreter: "{{ ansible_facts['python']['executable'] }}" - -openstack_service_setup_host: "{{ groups['utility_all'][0] }}" -openstack_service_setup_host_python_interpreter: "/usr/bin/python3" diff --git a/playbooks/defaults/source_install.yml b/playbooks/defaults/source_install.yml deleted file mode 100644 index 69c9abf65d..0000000000 --- a/playbooks/defaults/source_install.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Copyright 2018, SUSE LINUX GmbH. -# -# 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. - -cinder_bin: "/openstack/venvs/cinder-{{ venv_tag }}/bin" -keystone_bin: "/openstack/venvs/keystone-{{ venv_tag }}/bin" -nova_bin: "/openstack/venvs/nova-{{ venv_tag }}/bin" -neutron_bin: "/openstack/venvs/neutron-{{ venv_tag }}/bin" - -# URL for the frozen internal openstack repo. -repo_release_path: "{{ openstack_repo_url }}/os-releases/{{ openstack_release }}/{{ os_distro_version }}" - -## OpenStack source options -openstack_repo_protocol: "{{ openstack_service_internaluri_proto }}" -openstack_repo_url: "{{ openstack_repo_protocol }}://{{ internal_lb_vip_address }}:{{ repo_server_port }}" -openstack_repo_git_url: "git://{{ internal_lb_vip_address }}" - -## Delegate all service setup tasks to the utility host, and use the utility venv python interpreter -openstack_service_setup_host: "{{ groups['utility_all'][0] }}" -openstack_service_setup_host_python_interpreter: "/openstack/venvs/utility-{{ openstack_release }}/bin/python" - -## Delegate all database setup tasks to the utility host, and use the utility venv python interpreter -openstack_db_setup_host: "{{ openstack_service_setup_host }}" -openstack_db_setup_python_interpreter: "{{ openstack_service_setup_host_python_interpreter }}" - -# Locally cached copy on the repo server for the OpenStack upper-constraints.txt -requirements_git_url: "{{ openstack_repo_url }}/constraints/upper_constraints_cached.txt" diff --git a/playbooks/healthcheck-infrastructure.yml b/playbooks/healthcheck-infrastructure.yml index bacd8aa3fe..8c7716849c 100644 --- a/playbooks/healthcheck-infrastructure.yml +++ b/playbooks/healthcheck-infrastructure.yml @@ -25,9 +25,13 @@ gather_facts: yes vars: repo_requirements_file: "constraints/upper_constraints_cached.txt" - vars_files: - - "defaults/{{ install_method }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Check the repo sync file on each repo server uri: url: "{{ openstack_repo_protocol }}://{{ hostvars[item]['management_address'] }}:{{ repo_server_port }}/{{ repo_requirements_file }}" @@ -86,9 +90,15 @@ serial: - 3 - 100% - vars_files: - - defaults/source_install.yml tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + vars: + install_method: 'source' + # Repo release path points to the internal LB vip - name: Check the presence of upper constraints on your repos and check load balancing uri: @@ -101,10 +111,13 @@ - name: Ensure the service setup host is ready to run openstack calls hosts: "{{ openstack_service_setup_host | default('localhost') }}" gather_facts: no - vars_files: - - "defaults/{{ install_method | default('source') }}_install.yml" vars: ansible_python_interpreter: "{{ openstack_service_setup_host_python_interpreter | default(ansible_facts['python']['executable']) }}" + pre_tasks: + - name: Setup installation variables + import_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method | default('source') }}" tasks: - name: Get openstack client config openstack.cloud.config: @@ -328,9 +341,12 @@ gather_facts: no vars: venv_path: /tmp/rabbitmqtest - vars_files: - - "defaults/{{ install_method }}_install.yml" post_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true - name: Generate venv for rabbitmq testing include_role: name: "python_venv_build" diff --git a/playbooks/openstack-hosts-setup.yml b/playbooks/openstack-hosts-setup.yml index be659877f7..b54f9156c1 100644 --- a/playbooks/openstack-hosts-setup.yml +++ b/playbooks/openstack-hosts-setup.yml @@ -50,6 +50,12 @@ gather_facts: false user: root pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Check for a supported Operating System assert: that: @@ -61,8 +67,6 @@ Ubuntu 22.04 (Jammy), CentOS 9 Stream, and Rocky Linux 9. roles: - role: "openstack_hosts" - vars_files: - - "defaults/{{ install_method }}_install.yml" post_tasks: - name: Ensure deploy host SSH connection is reset meta: reset_connection diff --git a/playbooks/openstack-resources.yml b/playbooks/openstack-resources.yml index 288fab3406..710ca73556 100644 --- a/playbooks/openstack-resources.yml +++ b/playbooks/openstack-resources.yml @@ -15,9 +15,13 @@ - name: Create requested OpenStack Resources hosts: "{{ openstack_service_setup_host | default('localhost') }}" - vars_files: - - "defaults/{{ install_method | default('source') }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Include openstack_resources role ansible.builtin.include_role: name: openstack.osa.openstack_resources diff --git a/playbooks/os-adjutant-install.yml b/playbooks/os-adjutant-install.yml index e66e1449c8..df42418c31 100644 --- a/playbooks/os-adjutant-install.yml +++ b/playbooks/os-adjutant-install.yml @@ -38,9 +38,12 @@ serial: "{{ adjutant_api_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-aodh-install.yml b/playbooks/os-aodh-install.yml index 1713e3b719..d0b651313c 100644 --- a/playbooks/os-aodh-install.yml +++ b/playbooks/os-aodh-install.yml @@ -38,13 +38,17 @@ serial: "{{ aodh_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain # the load balancer back end for this container. + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Disabling haproxy backends include_tasks: common-tasks/haproxy-endpoint-manage.yml vars: diff --git a/playbooks/os-barbican-install.yml b/playbooks/os-barbican-install.yml index 6c39bd2a3a..92ac254795 100644 --- a/playbooks/os-barbican-install.yml +++ b/playbooks/os-barbican-install.yml @@ -38,9 +38,12 @@ serial: "{{ barbican_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-blazar-install.yml b/playbooks/os-blazar-install.yml index 6a579b239a..c56f6efd9b 100644 --- a/playbooks/os-blazar-install.yml +++ b/playbooks/os-blazar-install.yml @@ -38,9 +38,12 @@ serial: "{{ blazar_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-ceilometer-install.yml b/playbooks/os-ceilometer-install.yml index eb111209b4..a73df35075 100644 --- a/playbooks/os-ceilometer-install.yml +++ b/playbooks/os-ceilometer-install.yml @@ -28,9 +28,13 @@ gather_facts: false serial: "{{ ceilometer_serial | default(['1','100%']) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Including container-setup tasks include_role: name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" diff --git a/playbooks/os-cloudkitty-install.yml b/playbooks/os-cloudkitty-install.yml index f6d52e150d..ced2cd6d5e 100644 --- a/playbooks/os-cloudkitty-install.yml +++ b/playbooks/os-cloudkitty-install.yml @@ -39,9 +39,12 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-designate-install.yml b/playbooks/os-designate-install.yml index e9a97d9046..4fdd644de0 100644 --- a/playbooks/os-designate-install.yml +++ b/playbooks/os-designate-install.yml @@ -41,9 +41,12 @@ serial: "{{ designate_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index 5524f462d0..5eaa0b5b89 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -38,9 +38,12 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-gnocchi-install.yml b/playbooks/os-gnocchi-install.yml index fb3b8626f2..85a11fa83a 100644 --- a/playbooks/os-gnocchi-install.yml +++ b/playbooks/os-gnocchi-install.yml @@ -38,9 +38,12 @@ serial: "{{ gnocchi_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-heat-install.yml b/playbooks/os-heat-install.yml index bebec2bfb7..717c9f2a33 100644 --- a/playbooks/os-heat-install.yml +++ b/playbooks/os-heat-install.yml @@ -38,9 +38,12 @@ serial: "{{ heat_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-horizon-install.yml b/playbooks/os-horizon-install.yml index cb345a9ad8..58e74dde90 100644 --- a/playbooks/os-horizon-install.yml +++ b/playbooks/os-horizon-install.yml @@ -38,9 +38,12 @@ serial: "{{ horizon_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-ironic-install.yml b/playbooks/os-ironic-install.yml index 1a9e951f5e..e24a033ada 100644 --- a/playbooks/os-ironic-install.yml +++ b/playbooks/os-ironic-install.yml @@ -38,9 +38,12 @@ serial: "{{ ironic_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index e7f012c4c6..ec80ed1733 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -22,11 +22,15 @@ - name: Implement openrc/clouds.yaml on the designated service host hosts: "{{ openstack_service_setup_host | default('localhost') }}" gather_facts: "{{ osa_gather_facts | default(True) }}" - vars_files: - - "defaults/{{ install_method | default('source') }}_install.yml" become: yes tags: - openrc + pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true roles: - role: "openstack_openrc" @@ -65,9 +69,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain @@ -126,9 +134,13 @@ gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Refresh local facts setup: filter: ansible_local @@ -190,9 +202,13 @@ gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: "Post configure SP/IDP" include_role: name: os_keystone diff --git a/playbooks/os-magnum-install.yml b/playbooks/os-magnum-install.yml index dc1a160a7b..cdc5a16da7 100644 --- a/playbooks/os-magnum-install.yml +++ b/playbooks/os-magnum-install.yml @@ -41,9 +41,12 @@ gather_facts: false serial: "{{ magnum_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-manila-install.yml b/playbooks/os-manila-install.yml index d4ef352ab9..e3cc1b1526 100644 --- a/playbooks/os-manila-install.yml +++ b/playbooks/os-manila-install.yml @@ -37,9 +37,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Gather additional facts include_tasks: "common-tasks/gather-hardware-facts.yml" args: @@ -92,10 +96,14 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Including unbound-clients tasks include_tasks: common-tasks/unbound-clients.yml when: diff --git a/playbooks/os-masakari-install.yml b/playbooks/os-masakari-install.yml index 42c86ff658..5b0852ac2c 100644 --- a/playbooks/os-masakari-install.yml +++ b/playbooks/os-masakari-install.yml @@ -58,9 +58,13 @@ gather_facts: false serial: "{{ masakari_api_serial | default(['1','100%']) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Gather additional facts include_tasks: "common-tasks/gather-hardware-facts.yml" args: diff --git a/playbooks/os-mistral-install.yml b/playbooks/os-mistral-install.yml index e832ecc79c..899afaaf67 100644 --- a/playbooks/os-mistral-install.yml +++ b/playbooks/os-mistral-install.yml @@ -38,9 +38,13 @@ serial: "{{ mistral_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 9e05c7fcc7..9224fd8bc1 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -51,9 +51,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # Enable execution of ceph_client on the nova compute hosts if cinder RBD # backends are used. This is necessary to ensure that volume-backed Nova # instances can function when RBD is the volume backend. @@ -139,9 +143,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # Enable execution of ceph_client on the nova compute hosts if cinder RBD # backends are used. This is necessary to ensure that volume-backed Nova # instances can function when RBD is the volume backend. @@ -240,9 +248,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Running db_post_setup tasks from the role import_role: name: os_nova diff --git a/playbooks/os-octavia-install.yml b/playbooks/os-octavia-install.yml index 7111f6b64b..17538ce32c 100644 --- a/playbooks/os-octavia-install.yml +++ b/playbooks/os-octavia-install.yml @@ -38,9 +38,13 @@ serial: "{{ octavia_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-placement-install.yml b/playbooks/os-placement-install.yml index ba4336af0b..89e727487e 100644 --- a/playbooks/os-placement-install.yml +++ b/playbooks/os-placement-install.yml @@ -38,9 +38,13 @@ serial: "{{ placement_api_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-rally-install.yml b/playbooks/os-rally-install.yml index 9fe3241e61..8f98be5721 100644 --- a/playbooks/os-rally-install.yml +++ b/playbooks/os-rally-install.yml @@ -24,9 +24,13 @@ gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: End playbook meta: end_play when: diff --git a/playbooks/os-skyline-install.yml b/playbooks/os-skyline-install.yml index 3f4414cc09..cec036aba6 100644 --- a/playbooks/os-skyline-install.yml +++ b/playbooks/os-skyline-install.yml @@ -38,9 +38,13 @@ serial: "{{ skyline_api_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Including container-setup tasks include_role: name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 554e9acd3d..cd4220b517 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -36,9 +36,13 @@ hosts: swift_all:swift_remote_all gather_facts: false user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Including container-setup tasks include_role: name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup" diff --git a/playbooks/os-swift-sync.yml b/playbooks/os-swift-sync.yml index 72a7d69f0f..f2d1f58810 100644 --- a/playbooks/os-swift-sync.yml +++ b/playbooks/os-swift-sync.yml @@ -19,8 +19,12 @@ hosts: swift_all:swift_remote_all gather_facts: "{{ osa_gather_facts | default(True) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" + pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true roles: - role: "os_swift" swift_do_setup: False diff --git a/playbooks/os-tacker-install.yml b/playbooks/os-tacker-install.yml index 016a979e55..8f3bc00569 100644 --- a/playbooks/os-tacker-install.yml +++ b/playbooks/os-tacker-install.yml @@ -38,9 +38,13 @@ serial: "{{ tacker_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-tempest-install.yml b/playbooks/os-tempest-install.yml index 4cf6cdc196..8d45efa49f 100644 --- a/playbooks/os-tempest-install.yml +++ b/playbooks/os-tempest-install.yml @@ -27,9 +27,13 @@ hosts: utility_all[0] gather_facts: false user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: End playbook meta: end_play when: diff --git a/playbooks/os-trove-install.yml b/playbooks/os-trove-install.yml index d47ad390a3..17cffa0dff 100644 --- a/playbooks/os-trove-install.yml +++ b/playbooks/os-trove-install.yml @@ -41,9 +41,13 @@ serial: "{{ trove_serial | default(['1','100%']) }}" user: root environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/os-zun-install.yml b/playbooks/os-zun-install.yml index 54dc6904a7..94522b4133 100644 --- a/playbooks/os-zun-install.yml +++ b/playbooks/os-zun-install.yml @@ -54,9 +54,13 @@ gather_facts: false serial: "{{ zun_serial | default(['1','100%']) }}" user: root - vars_files: - - "defaults/{{ install_method }}_install.yml" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + # In order to ensure that any container, software or # config file changes which causes a container/service # restart do not cause an unexpected outage, we drain diff --git a/playbooks/repo-install.yml b/playbooks/repo-install.yml index 8096763403..3f00b0ac73 100644 --- a/playbooks/repo-install.yml +++ b/playbooks/repo-install.yml @@ -72,10 +72,14 @@ gather_facts: false serial: "{{ repo_serial | default(['1','100%']) }}" user: root + pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true roles: - role: "repo_server" - vars_files: - - "defaults/{{ install_method }}_install.yml" environment: "{{ deployment_environment_variables | default({}) }}" tags: - repo-server diff --git a/playbooks/utility-install.yml b/playbooks/utility-install.yml index 3d21b4b905..864bd9a650 100644 --- a/playbooks/utility-install.yml +++ b/playbooks/utility-install.yml @@ -25,8 +25,6 @@ gather_facts: false serial: "{{ utility_serial | default(['1','100%']) }}" environment: "{{ deployment_environment_variables | default({}) }}" - vars_files: - - "defaults/{{ install_method }}_install.yml" vars: utility_upper_constraints_url: "{{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}" @@ -48,6 +46,12 @@ listen: - "venv changed" pre_tasks: + - name: Setup installation variables + include_role: + name: openstack.osa.install_defaults + defaults_from: "{{ install_method }}" + public: true + - name: Including container-setup tasks include_role: name: "openstack.osa.{{ container_tech | default('lxc') }}_container_setup"