From: Gaƫtan Duchaussois Date: Mon, 13 May 2019 09:28:15 +0000 (+0200) Subject: Add info on failures X-Git-Tag: v0.9^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=df1e33392ac3fe92e3043b258ea084f9db418d89;p=github%2Ffretlink%2Fansible-kong-app.git Add info on failures --- 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"