X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fansible-server%2Fsrc%2Fmain%2FPlaybooks%2Fansible_huawei_rollback%400.00.yml;h=fa164c9cca80bc59eb9b478309395a0aa9e0a9b3;hb=e5aea0d8f2ca5c50cf65a2bfad92d2522743fcbf;hp=0d20bc3ed2f1fb7e74c1426bc2883c55e6280329;hpb=d6f5a348861c0becfdababee3eaa7ff99240fe5f;p=sdnc%2Foam.git diff --git a/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml b/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml index 0d20bc3e..fa164c9c 100644 --- a/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml +++ b/installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml @@ -3,6 +3,16 @@ tasks: - name: execute swFallback operation - shell: ./swm/swFallback.sh --filter {{filter}} - register: fallback__result + shell: ./swm/swFallback --filter {{filter}} + ignore_errors: yes + register: fallback_result + + - name: write output to file + local_action: copy content="{{fallback_result.stdout}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt" + when: fallback_result.stdout != "" + + - name: use result of swFallback as the result of Playbook + fail: + msg: "{{fallback_result.stderr}}" + when: fallback_result is failed