]> git.immae.eu Git - github/fretlink/ansible-kong-app.git/commitdiff
debug3 debug_upgrade
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Thu, 4 Apr 2019 09:04:22 +0000 (11:04 +0200)
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>
Thu, 4 Apr 2019 09:04:22 +0000 (11:04 +0200)
tasks/plugins.yml

index e0eee814184c300633af19c8829f39825e3902a9..17188641b02e5eb5993338904200c3669170feb0 100644 (file)
   loop_control:
     loop_var: plugin
 
+- name: debug3
+  debug:
+    msg: "{{ plugin | combine(current_body)  | to_json }}"
+  vars:
+    current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}"
+    current_id_hash:
+      id: "{{ current_config.id }}"
+    current_body: "{{ (current_id_hash.id == '') | ternary({}, current_id_hash) }}"
+    exists_plugin: "{{ current_id_hash.id == '' }}"
+  with_items: "{{ service.plugins | default([]) }}"
+  loop_control:
+    loop_var: plugin
+
 - name: Setup plugin
   uri:
     url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}"