From 814bd2cf4b4bb393cb7af1ea8587c9573c5edcef Mon Sep 17 00:00:00 2001 From: John Fulton Date: Thu, 2 Aug 2018 00:23:57 +0000 Subject: [PATCH] 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 5b1c4c00eea2242b82bd68498b45b7f65adbf811) --- workbooks/ceph-ansible.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workbooks/ceph-ansible.yaml b/workbooks/ceph-ansible.yaml index 1f81c041f..bf7f10608 100644 --- a/workbooks/ceph-ansible.yaml +++ b/workbooks/ceph-ansible.yaml @@ -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: