From ee9d9303c8ebc9d82b4892e702c8bfc2a0316cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Thu, 4 Apr 2019 10:57:21 +0200 Subject: debug --- tasks/plugins.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tasks/plugins.yml b/tasks/plugins.yml index 3b105ae..e0eee81 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -7,6 +7,23 @@ apikey: "{{ server.kong_app_admin_apikey }}" register: kong_app_service_plugins_check +- name: debug + debug: + var: kong_app_service_plugins_check + +- name: debug2 + debug: + var: current_body + 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) }}" -- cgit v1.2.3