migration: Fail task if executed script failed

Previously the migration playbook continued even if tripleo deploy
failed which damaged the environment even more. This patch will make the
task fail if deploy fails too. There are also other commands which
return code was ignored.

Change-Id: Ib27fa676e126503eacb97b24e95aa7cd2982adab
Signed-off-by: Jakub Libosvar <libosvar@redhat.com>
(cherry picked from commit ab62f17409)
This commit is contained in:
Jakub Libosvar
2022-05-11 17:23:12 -04:00
parent 771de46a76
commit 564c10eca3
2 changed files with 2 additions and 3 deletions

View File

@@ -19,4 +19,3 @@
shell: >
{{ ovn_migration_temp_dir_del }}/delete-neutron-resources.sh 2>&1 >
{{ ovn_migration_temp_dir_del }}/delete-neutron-resources.sh.log
changed_when: true

View File

@@ -15,10 +15,10 @@
shell: >
set -o pipefail &&
{{ ovn_migration_temp_dir }}/generate-ovn-extras.sh
changed_when: False
args:
creates: $HOME/ovn-extras.yaml
- name: Updating the overcloud stack with OVN services
shell: >
set -o pipefail &&
{{ overcloud_ovn_deploy_script }} 2>&1 > {{ overcloud_ovn_deploy_script }}.log
changed_when: true