blob: 7ad88ccc5fa7aeab96f0d5465f1207def6ec8e46 [file] [log] [blame] [edit]
# Copyright (c) 2023 VEXXHOST, Inc.
#
# 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.
- name: Generate configuration difference
ansible.builtin.include_role:
name: osa_config_diff
vars:
osa_config_diff_containers_group: cinder_volume
osa_config_diff_chart_ref: "{{ cinder_helm_chart_ref }}"
osa_config_diff_release_namespace: "{{ cinder_helm_release_namespace }}"
osa_config_diff_release_values: "{{ _cinder_helm_values | combine(cinder_helm_values, recursive=True) }}"
osa_config_diff_config_files:
backends.conf: /etc/cinder/cinder.conf
cinder.conf: /etc/cinder/cinder.conf
- name: Turn off the "cinder-volume" service
run_once: true
delegate_to: "{{ item }}"
ansible.builtin.service:
name: cinder-volume
state: stopped
enabled: false
loop: "{{ groups['cinder_volume'] }}"
- name: Turn off the "cinder-backup" service
run_once: true
delegate_to: "{{ item }}"
ansible.builtin.service:
name: cinder-backup
state: stopped
enabled: false
loop: "{{ groups['cinder_backup'] }}"
- name: Migrate the database
ansible.builtin.include_role:
name: migrate_db_from_osa
vars:
migrate_db_from_osa_pxc_namespace: "{{ cinder_helm_release_namespace }}"
migrate_db_from_osa_containers_group: cinder_all
migrate_db_from_osa_databases:
cinder: cinder
- name: Run deployment flow
ansible.builtin.import_tasks:
file: main.yml
- name: Migrate HAproxy
ansible.builtin.include_role:
name: migrate_haproxy_from_osa
vars:
migrate_haproxy_from_osa_group: cinder_all
migrate_haproxy_from_osa_service_namespace: "{{ cinder_helm_release_namespace }}"
migrate_haproxy_from_osa_service_name: cinder-api
migrate_haproxy_from_osa_haproxy_backend: cinder_api