]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
Add info on failures 15/head
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Mon, 13 May 2019 09:28:15 +0000 (11:28 +0200)
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Mon, 13 May 2019 09:36:53 +0000 (11:36 +0200)
tasks/plugins.yml

index f6d1c787d532600a757bc09c1757eb5cbbbaa516..90a038667db479d8adf82c84f8dac338403b929a 100644 (file)
     - 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"