Publish a better failure message for Update Ansible
This review return and publish a better failling message back to the client with the log path in order to make the debuging easy. Change-Id: I6e2457984cf098195b5c71dccaf420448a75a4a1
This commit is contained in:
parent
b98d1ac1f1
commit
93113e73e8
@ -141,7 +141,9 @@ workflows:
|
||||
limit_hosts: <% $.nodes %>
|
||||
module_path: <% $.module_path %>
|
||||
queue_name: <% $.ansible_queue_name %>
|
||||
reproduce_command: true
|
||||
execution_id: <% execution().id %>
|
||||
work_dir: <% $.work_dir %>/<% execution().id %>
|
||||
tags: <% $.tags %>
|
||||
skip_tags: <% $.skip_tags %>
|
||||
trash_output: true
|
||||
@ -149,8 +151,11 @@ workflows:
|
||||
- node_update_passed: <% task().result.returncode = 0 %>
|
||||
- node_update_failed: <% task().result.returncode != 0 %>
|
||||
on-error: node_update_failed
|
||||
publish-on-error:
|
||||
status: FAILED
|
||||
message: Ansible failed, check log at <% $.work_dir %>/<% execution().id %>/ansible.log.
|
||||
publish:
|
||||
output: <% task().result %>
|
||||
log_path: <% task().result.get('log_path') %>
|
||||
|
||||
node_update_passed:
|
||||
on-success: send_message
|
||||
@ -162,7 +167,7 @@ workflows:
|
||||
on-success: send_message
|
||||
publish:
|
||||
status: FAILED
|
||||
message: Failed to update nodes - <% $.nodes %>, please see the logs.
|
||||
message: Ansible failed, check log at <% $.get('work_dir') %>/<% execution().id %>/ansible.log.
|
||||
|
||||
send_message:
|
||||
workflow: tripleo.messaging.v1.send
|
||||
|
Loading…
x
Reference in New Issue
Block a user