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:
John Fulton 2018-08-02 00:23:57 +00:00
parent 742707ddf0
commit 814bd2cf4b
1 changed files with 2 additions and 0 deletions

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: