#!/bin/env bash
#
# Run minor update on overcloud nodes
#
set -euo pipefail
{% if  item|string == 'all' %}
echo "Running minor update of all overcloud nodes"
openstack overcloud update stack 2>&1
{% else %}
{% set tmp_role_name = item.split('-', 1)[-1] %}
echo "Runing update of {{ tmp_role_name }}"
openstack overcloud update stack --nodes {{ tmp_role_name }} 2>&1
{% endif %}
