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
This commit is contained in:
John Fulton
2018-08-02 00:24:18 +00:00
parent 7f27285696
commit 5b1c4c00ee
+2
View File
@@ -119,6 +119,8 @@ workflows:
parse_node_data_lookup:
publish:
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
map_node_data_lookup:
publish: