From 507bb99c0f6c79d5257d293a5eda6bbd3e34caaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Thu, 26 Apr 2018 18:15:47 +0200 Subject: support multiple kong servers --- tasks/plugins.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tasks/plugins.yml') diff --git a/tasks/plugins.yml b/tasks/plugins.yml index 4dd9137..cedbbd2 100644 --- a/tasks/plugins.yml +++ b/tasks/plugins.yml @@ -1,19 +1,19 @@ - name: Get plugins uri: - url: "{{ kong_app_admin_url }}/services/{{ service.name }}/plugins" + url: "{{ server.kong_app_admin_url }}/services/{{ service.name }}/plugins" method: GET validate_certs: no headers: - apikey: "{{ kong_app_admin_apikey }}" + apikey: "{{ server.kong_app_admin_apikey }}" register: kong_app_service_plugins_check - name: Setup plugin uri: - url: "{{ kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" + url: "{{ server.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 }}" + apikey: "{{ server.kong_app_admin_apikey }}" Content-Type: application/json status_code: 200,201 with_items: "{{ service.plugins | default([]) }}" -- cgit v1.2.3