tripleo-upgrade/tasks/fast-forward-upgrade/main.yml

128 lines
4.5 KiB
YAML

---
- name: create upgrade prepare scripts
include: create-prepare-scripts.yaml
tags: create_ffu_prepare_scripts
- name: create fast forward upgrade scripts
include: create-ffu-scripts.yaml
tags: create_ffu_scripts
loop_control:
loop_var: current_release
with_items: "{{ ffu_undercloud_releases }}"
when: ffu_noop|bool or ffu_undercloud_upgrade|bool or ffu_overcloud_upgrade|bool
- block:
- name: ffu undercloud upgrade
include: undercloud-upgrade.yml
loop_control:
loop_var: current_release
with_items: "{{ ffu_undercloud_releases }}"
- name: apply post ffu undercloud upgrade workarounds
command: "{{working_dir}}/post_ffu_undercloud_upgrade_workarounds.sh"
when: ffu_upgrade_workarounds|bool
when: ffu_undercloud_upgrade|bool
- block:
- name: Ensure ansible-pacemaker module is present in CI.
yum: name=ansible-pacemaker state=latest
when: tripleo_ci|default(false)|bool
tags: ffu_upgrade_playbook
become: true
- include: "{{ item }}"
with_items:
- '../common/l3_agent_connectivity_check_start_script.yml'
- '../common/l3_agent_failover_check_pre_script.yml'
tags: ffu_overcloud_prepare
- name: apply pre ffu overcloud prepare workarounds
command: "{{working_dir}}/pre_ffu_overcloud_prepare_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_overcloud_prepare
- include: ../common/convert_nic_templates.yaml
tags: ffu_overcloud_prepare
- name: set upgrade_prepare_extra_params for ffu prepare with custom repos
set_fact:
upgrade_prepare_extra_params: ["{{working_dir}}/ffu_repos.yaml"]
when: "'tripleo-repos' not in ffu_overcloud_repo_type"
- name: set upgrade_prepare_extra_params for ffu prepare with deployed server
set_fact:
upgrade_prepare_extra_params: '{{ upgrade_prepare_extra_params + ["{{tht_directory}}/environments/updates/update-from-deployed-server-newton.yaml"] }}'
when: deployed_server|default(false)|bool
- include: ../upgrade/overcloud_upgrade_prepare.yml
tags: ffu_overcloud_prepare
- include: "{{ item }}"
with_items:
- '../common/l3_agent_connectivity_check_stop_script.yml'
- '../common/l3_agent_failover_check_post_script.yml'
tags: ffu_overcloud_prepare
- name: apply pre fast forward overcloud upgrade run workarounds
command: "{{working_dir}}/pre_ffu_overcloud_run_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_overcloud_run
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_overcloud_run
- name: run overcloud fast forward upgrade
command: "{{working_dir}}/overcloud_upgrade_run.sh"
tags: ffu_overcloud_run
- include: ../common/l3_agent_connectivity_check_stop_script.yml
tags: ffu_overcloud_run
## we can either upgrade all overcloud nodes at one or per role/node
- name: upgrade all overcloud nodes at once
include: overcloud_bulk.yaml
tags: ffu_overcloud_upgrade_bulk
when: ffu_bulk|bool
- name: upgrade overcloud nodes per roles
include: overcloud_role.yaml
tags: ffu_overcloud_upgrade_role
when: not ffu_bulk|bool
- when: ceph_osd_enabled|bool
block:
- name: apply pre ffu ceph upgrade workarounds
command: "{{working_dir}}/pre_ffu_overcloud_ceph_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_overcloud_ceph
- name: run FFU ceph osd nodes upgrade scripts
command: "{{ working_dir }}/overcloud_upgrade_CephStorage.sh"
tags: ffu_overcloud_ceph
- include: ../common/l3_agent_connectivity_check_start_script.yml
tags: ffu_overcloud_ceph
- include: ../upgrade/ceph_upgrade_run.yml
tags: ffu_overcloud_ceph
- include: "{{ item }}"
with_items:
- '../common/l3_agent_connectivity_check_stop_script.yml'
- '../common/l3_agent_failover_check_post_script.yml'
tags: ffu_overcloud_ceph
- name: apply pre ffu overcloud converge workarounds
command: "{{working_dir}}/pre_ffu_overcloud_converge_workarounds.sh"
when: ffu_upgrade_workarounds|bool
tags: ffu_overcloud_converge
- include: ../upgrade/overcloud_upgrade_converge.yml
tags: ffu_overcloud_converge
- name: run post upgrade actions
include: ../common/nova_actions_check.yml
tags: ffu_overcloud_post
when: ffu_overcloud_upgrade|bool