#!/bin/bash
#
set -euo pipefail

source {{ undercloud_rc }}
{% if 'ffu_upgrade_steps_playbook_script' in item %}
ansible-playbook --module-path /usr/share/ansible-modules/ -i {{ working_dir }}/tripleo-ansible-inventory-static.yaml -b {{ overcloud_config_dir }}/upgrade_steps_playbook.yaml --skip-tags=validation --limit={% for comp in oc_roles|intersect(['Compute']) -%}\!{{ comp }}{% if not loop.last %},{% endif %}{% endfor %} | tee {{ working_dir}}/{{ item }}_non_Compute.log
{% elif 'ffu_deploy_steps_playbook_script' in item %}
ansible-playbook --module-path /usr/share/ansible-modules/ -i {{ working_dir }}/tripleo-ansible-inventory-static.yaml -b {{ overcloud_config_dir }}/deploy_steps_playbook.yaml --limit={% for comp in oc_roles|intersect(['Compute']) -%}\!{{ comp }}{% if not loop.last %},{% endif %}{% endfor %} | tee {{ working_dir}}/{{ item }}_non_Compute.log
{% endif %}

