- name: Run pre undercloud {{ current_release }} upgrade workarounds
  command: "{{ working_dir }}/pre_undercloud_upgrade_{{ current_release }}_workarounds.sh"
  when: ffu_upgrade_workarounds

- name: Include rhos-release role.
  include_role:
    name: rhos-release
  vars:
    director_build: "{{ install.get('director', {}).build|default(omit) }}"
    build: "{{ install.build | default(omit) }}"
    mirror: "{{ install.mirror | default(omit) }}"
    rr_distro_version: "{{ install.osrelease|default(omit) }}"
    rhos_release_rpm: "https://url.corp.redhat.com/rhos-release-latest-rpm"
    release: "{{ current_release }}"
    rr_buildmods: "pin"
  become: true
  become_user: root
  when: ffu_undercloud_repo_type == 'rhos-release'

- name: Upgrade undercloud to {{ current_release }}
  command: "{{ working_dir }}/undercloud_upgrade_{{ current_release }}.sh"

- name: Run post undercloud {{ release }} upgrade workarounds
  command: "{{ working_dir }}/post_undercloud_upgrade_{{ current_release }}_workarounds.sh"
  when: ffu_upgrade_workarounds
