--- - name: Add comptatibility support to install_yamls hosts: "{{ cifmw_target_host | default('localhost') }}" gather_facts: false tasks: - name: Run pre_update hooks vars: step: pre_update ansible.builtin.import_role: name: run_hook - name: Comptatibility layer with install_yamls when: - cifmw_architecture_scenario is defined block: - name: Prepare install_yamls make targets ansible.builtin.include_role: name: install_yamls - name: Update repos and openstack services containers hosts: "{{ cifmw_target_host | default('localhost') }}" gather_facts: false tasks: - name: Initialize monitoring ansible.builtin.include_role: name: update tasks_from: init_monitoring.yml - name: Set update step to Update Repo and OpenStack Services Containers ansible.builtin.command: cmd: > {{ cifmw_basedir }}/tests/update/update_event.sh Update Repo and OpenStack Services Containers - name: Copy repos to before_update_repos directory ansible.builtin.copy: remote_src: true src: "{{ cifmw_basedir }}/artifacts/repositories/" dest: "{{ cifmw_basedir }}/artifacts/before_update_repos/" mode: "0755" - name: Run repo_setup ansible.builtin.include_role: name: repo_setup - name: Update all openstack services containers env vars in meta operator with tag from delorean and update OPENSTACK_RELEASE_VERSION vars: cifmw_set_openstack_containers_dlrn_md5_path: "{{ cifmw_basedir }}/artifacts/repositories/delorean.repo.md5" cifmw_set_openstack_containers_tag_from_md5: true cifmw_set_openstack_containers_extra_vars: "{{ cifmw_edpm_prepare_extra_vars }}" cifmw_set_openstack_containers_openstack_version_change: true cifmw_set_openstack_containers_openstack_final_env: "operator_env_after_update.txt" ansible.builtin.include_role: name: set_openstack_containers when: cifmw_ci_gen_kustomize_values_deployment_version is not defined - name: Sync repos for controller to compute hosts: computes gather_facts: true tasks: - name: Copy repositories from controller to computes become: true ansible.builtin.copy: dest: "/etc/yum.repos.d/" src: "{{ cifmw_basedir }}/artifacts/repositories/" mode: "0755" - name: Log Ceph update state hosts: "{{ cifmw_target_host | default('localhost') }}" gather_facts: false tasks: - name: Set update step to Ceph Update ansible.builtin.command: cmd: > {{ cifmw_basedir }}/tests/update/update_event.sh Ceph Update - name: Run Ceph update if part of the deployment hosts: "{{ (groups[cifmw_ceph_target | default('computes')] | default([]))[:1] }}" gather_facts: true tasks: - name: Update Ceph when: cifmw_ceph_update | default(false) | bool tags: - update - ceph_update block: - name: Get ceph.conf to inspect become: true ansible.builtin.slurp: src: "{{ cifmw_ceph_conf }}" vars: cifmw_ceph_conf: "/etc/ceph/ceph.conf" register: cephconf - name: Save /ceph.conf and inspect content become: true delegate_to: localhost ansible.builtin.copy: content: "{{ cephconf['content'] | b64decode }}" dest: "/tmp/ceph.conf" mode: "0644" - name: Extract the CephFSID from ceph.conf ansible.builtin.set_fact: ceph_fsid: "{{ lookup('ansible.builtin.ini', 'fsid', section='global', file='/tmp/ceph.conf') }}" - name: Perform a Ceph Update ansible.builtin.import_role: name: cifmw_cephadm tasks_from: ceph_upgrade vars: cifmw_cephadm_fsid: "{{ ceph_fsid }}" - name: Run update role hosts: "{{ cifmw_target_host | default('localhost') }}" gather_facts: false tasks: - name: Set update step to Update Role ansible.builtin.command: cmd: > {{ cifmw_basedir }}/tests/update/update_event.sh Update Role - name: Run update tags: - update ansible.builtin.import_role: name: update - name: Set update step to End of Update Role ansible.builtin.command: cmd: > {{ cifmw_basedir }}/tests/update/update_event.sh End of Update Role - name: Stop monitoring block: - name: Verify monitoring pid file ansible.builtin.stat: path: "{{ cifmw_update_artifacts_basedir }}/monitor_resources_changes.pid" register: cifmw_update_monitoring_pid - name: Stop the monitoring process ansible.builtin.shell: cmd: >- kill $(cat {{ cifmw_basedir }}/tests/update/monitor_resources_changes.pid) register: _kill_result failed_when: _kill_result.rc not in [0, 1] when: cifmw_update_monitoring_pid.stat.exists | bool - name: Run post_update hooks vars: step: post_update ansible.builtin.import_role: name: run_hook