diff options
author | 2019-05-10 10:04:18 +0000 | |
---|---|---|
committer | 2019-05-10 10:04:18 +0000 | |
commit | 83ff8436156f3f976eff2633b0c54b9426d11a25 (patch) | |
tree | 356caabf8ea3829ac9acd0a71ebf9feb316fb69e /installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml | |
parent | 89a89ebe94c58324eb3e441ba23128057e7fd6d5 (diff) |
Fix missing payload for DGs and Playbooks of SW upgrade
Change-Id: I89a118ef1e05c76800d6c2fa640dc3dcf2d78fca
Issue-ID: SDNC-733
Signed-off-by: Enbo Wang <wangenbo@huawei.com>
Former-commit-id: 4ca9a8ea6cebfad2e3f423b90df187bcbc51a67b
Diffstat (limited to 'installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml')
-rw-r--r-- | installation/ansible-server/src/main/Playbooks/ansible_huawei_rollback@0.00.yml | 11 |
1 files changed, 11 insertions, 0 deletions
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 fa164c9c..8d8982af 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 @@ -11,6 +11,17 @@ local_action: copy content="{{fallback_result.stdout}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt"
when: fallback_result.stdout != ""
+ - name: build error message
+ set_fact:
+ err_msg:
+ "reason": "{{fallback_result.stderr}}"
+ "result": "Failure"
+ when: fallback_result is failed and fallback_result.stdout == "" and fallback_result.stderr != ""
+
+ - name: write error message to file
+ local_action: copy content="{{err_msg}}" dest="{{inventory_dir}}/{{inventory_hostname}}_results.txt"
+ when: fallback_result is failed and fallback_result.stdout == "" and fallback_result.stderr != ""
+
- name: use result of swFallback as the result of Playbook
fail:
msg: "{{fallback_result.stderr}}"
|