From 767c0e538b6b7c751784444fd6c676668e3a1b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Mon, 23 Apr 2018 10:35:56 +0200 Subject: setup an array of services --- tasks/plugins.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tasks/plugins.yml') diff --git a/tasks/plugins.yml b/tasks/plugins.yml index f096d4b..3ae0fbe 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -1,6 +1,6 @@ - name: Get plugins uri: - url: "{{ kong_app_admin_url }}/services/{{ kong_app_service_name }}/plugins" + url: "{{ kong_app_admin_url }}/services/{{ service.name }}/plugins" method: GET validate_certs: no headers: @@ -9,14 +9,14 @@ - name: Setup plugin uri: - url: "{{ kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ kong_app_service_name ~ '/plugins','plugins/' ~ current_config.id) }}" + url: "{{ kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" method: "{{ exists_plugin | ternary ('POST', 'PATCH') }}" body: "{{ plugin | combine(current_body) | to_json }}" headers: apikey: "{{ kong_app_admin_apikey }}" Content-Type: application/json status_code: 200,201 - with_items: "{{ kong_app_plugins }}" + with_items: "{{ service.plugins | default([]) }}" loop_control: loop_var: plugin vars: -- cgit v1.2.3