From df1e33392ac3fe92e3043b258ea084f9db418d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Mon, 13 May 2019 11:28:15 +0200 Subject: Add info on failures --- tasks/plugins.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tasks') diff --git a/tasks/plugins.yml b/tasks/plugins.yml index f6d1c78..90a0386 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -76,6 +76,22 @@ - method == "PATCH" no_log: true +- name: Give info on errors + debug: + msg: "{{ info }}" + loop: "{{ kong_plugin_update_st.results }}" + loop_control: + label: "{{ item.plugin.name }}" + when: + - kong_plugin_update_st is failed + - item is failed + - item.plugin is defined + - item.plugin.name is defined + - item.json is defined + - item.json.message is defined + vars: + info: "{{ item.json.message }}" + - name: Fail otherwise fail: msg: "This plugin {{ result.plugin.name }} failed to be created" -- cgit v1.2.3