diff options
author | Gaƫtan <36162164+gaetanfl@users.noreply.github.com> | 2019-05-13 11:50:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 11:50:42 +0200 |
commit | f820c109a54ea5c09fcff01025ba3ab63f18912c (patch) | |
tree | 56fe5d436f2aeef9e0ea0476143288e7791e5fe4 | |
parent | 42bbd0c742544050218b898a45d4d5bb6d3177f3 (diff) | |
parent | df1e33392ac3fe92e3043b258ea084f9db418d89 (diff) | |
download | ansible-kong-app-f820c109a54ea5c09fcff01025ba3ab63f18912c.tar.gz ansible-kong-app-f820c109a54ea5c09fcff01025ba3ab63f18912c.tar.zst ansible-kong-app-f820c109a54ea5c09fcff01025ba3ab63f18912c.zip |
Merge pull request #15 from gaetanfl/display_errorsv0.9
Add info on failures
-rw-r--r-- | tasks/plugins.yml | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ | |||
76 | - method == "PATCH" | 76 | - method == "PATCH" |
77 | no_log: true | 77 | no_log: true |
78 | 78 | ||
79 | - name: Give info on errors | ||
80 | debug: | ||
81 | msg: "{{ info }}" | ||
82 | loop: "{{ kong_plugin_update_st.results }}" | ||
83 | loop_control: | ||
84 | label: "{{ item.plugin.name }}" | ||
85 | when: | ||
86 | - kong_plugin_update_st is failed | ||
87 | - item is failed | ||
88 | - item.plugin is defined | ||
89 | - item.plugin.name is defined | ||
90 | - item.json is defined | ||
91 | - item.json.message is defined | ||
92 | vars: | ||
93 | info: "{{ item.json.message }}" | ||
94 | |||
79 | - name: Fail otherwise | 95 | - name: Fail otherwise |
80 | fail: | 96 | fail: |
81 | msg: "This plugin {{ result.plugin.name }} failed to be created" | 97 | msg: "This plugin {{ result.plugin.name }} failed to be created" |