Add on-error task to parse_node_data_lookup
If the ceph-ansible workbook fails to parse node_data_lookup
because it does not contain valid JSON, then fail the task
with a message that the NodeDataLookup JSON isn't valid.
Change-Id: I4b05933bd8b24119ed2d1040af60b4b3a2e3140f
Closes-Bug: #1784967
(cherry picked from commit 5b1c4c00ee
)
This commit is contained in:
parent
742707ddf0
commit
814bd2cf4b
|
@ -119,6 +119,8 @@ workflows:
|
||||||
parse_node_data_lookup:
|
parse_node_data_lookup:
|
||||||
publish:
|
publish:
|
||||||
json_node_data_lookup: <% json_parse($.node_data_lookup) %>
|
json_node_data_lookup: <% json_parse($.node_data_lookup) %>
|
||||||
|
on-error:
|
||||||
|
- fail(msg=<% 'Ceph deployment stopped, NodeDataLookup (node_data_lookup) is not valid JSON. {0}'.format($.node_data_lookup) %>)
|
||||||
on-success: map_node_data_lookup
|
on-success: map_node_data_lookup
|
||||||
map_node_data_lookup:
|
map_node_data_lookup:
|
||||||
publish:
|
publish:
|
||||||
|
|
Loading…
Reference in New Issue