]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
Fix retry and missing parenthesis 11/head
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Fri, 5 Apr 2019 09:43:51 +0000 (11:43 +0200)
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Fri, 5 Apr 2019 11:28:04 +0000 (13:28 +0200)
tasks/plugins.yml

index 164f6f255704b941b784a375ca5f5432f09c4e6d..f6d1c787d532600a757bc09c1757eb5cbbbaa516 100644 (file)
@@ -26,7 +26,7 @@
     current_config: "{{ plugins_list | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}"
     current_id_hash:
       id: "{{ current_config.id }}"
-    current_body: "{{ not current_id_hash.id  | ternary({}, current_id_hash) }}"
+    current_body: "{{ (not current_id_hash.id)  | ternary({}, current_id_hash) }}"
     exists_plugin: "{{ not current_id_hash.id  }}"
   when: not kong_app_service_plugins_check is skipped
   ignore_errors: true
@@ -58,7 +58,7 @@
   uri:
     url: "{{ server.kong_app_admin_url }}/services/{{ service.name }}/plugins"
     method: "POST"
-    body: "{{ body }}"
+    body: "{{ body | to_json }}"
     headers: "{{ headers }}"
     status_code: 200,201
   loop: "{{ kong_plugin_update_st.results }}"