aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tasks/plugins.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/tasks/plugins.yml b/tasks/plugins.yml
index e0eee81..1718864 100644
--- a/tasks/plugins.yml
+++ b/tasks/plugins.yml
@@ -24,6 +24,19 @@
24 loop_control: 24 loop_control:
25 loop_var: plugin 25 loop_var: plugin
26 26
27- name: debug3
28 debug:
29 msg: "{{ plugin | combine(current_body) | to_json }}"
30 vars:
31 current_config: "{{ kong_app_service_plugins_check.json.data | selectattr('name', 'equalto', plugin.name) | first |default({\"id\": ''}) }}"
32 current_id_hash:
33 id: "{{ current_config.id }}"
34 current_body: "{{ (current_id_hash.id == '') | ternary({}, current_id_hash) }}"
35 exists_plugin: "{{ current_id_hash.id == '' }}"
36 with_items: "{{ service.plugins | default([]) }}"
37 loop_control:
38 loop_var: plugin
39
27- name: Setup plugin 40- name: Setup plugin
28 uri: 41 uri:
29 url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" 42 url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}"