---
- include: ../common/l3_agent_connectivity_check_start_script.yml

- name: run overcloud major upgrade in each of the roles/hostgroups
  shell: "bash {{ overcloud_upgrade_run_script_base }}-{{ item }}.sh &> {{ working_dir }}/overcloud_upgrade_run_{{ item }}.log"
  with_items:
      - "{{ oc_roles|default('all') }}"
  register: overcloud_upgrade_nodes
  ignore_errors: yes

- name: was the overcloud upgrade composable step successful.
  fail: msg="Overcloud upgrade composable step failed... :("
  with_items: "{{ overcloud_upgrade_nodes.results }}"
  when: item.rc != 0

- include: ../common/l3_agent_connectivity_check_stop_script.yml
