aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/plugins.yml
diff options
context:
space:
mode:
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-04-26 18:15:47 +0200
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-04-26 18:39:08 +0200
commit507bb99c0f6c79d5257d293a5eda6bbd3e34caaf (patch)
tree3412555e05cc36c1efc01f8fc2c591d35de84f07 /tasks/plugins.yml
parent72627c8c7454feb4ee38f2d3eddd4cfcabb9a2d4 (diff)
downloadansible-kong-app-507bb99c0f6c79d5257d293a5eda6bbd3e34caaf.tar.gz
ansible-kong-app-507bb99c0f6c79d5257d293a5eda6bbd3e34caaf.tar.zst
ansible-kong-app-507bb99c0f6c79d5257d293a5eda6bbd3e34caaf.zip
support multiple kong servers
Diffstat (limited to 'tasks/plugins.yml')
-rw-r--r--tasks/plugins.yml8
1 files changed, 4 insertions, 4 deletions
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 @@
1- name: Get plugins 1- name: Get plugins
2 uri: 2 uri:
3 url: "{{ kong_app_admin_url }}/services/{{ service.name }}/plugins" 3 url: "{{ server.kong_app_admin_url }}/services/{{ service.name }}/plugins"
4 method: GET 4 method: GET
5 validate_certs: no 5 validate_certs: no
6 headers: 6 headers:
7 apikey: "{{ kong_app_admin_apikey }}" 7 apikey: "{{ server.kong_app_admin_apikey }}"
8 register: kong_app_service_plugins_check 8 register: kong_app_service_plugins_check
9 9
10- name: Setup plugin 10- name: Setup plugin
11 uri: 11 uri:
12 url: "{{ kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}" 12 url: "{{ server.kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ service.name ~ '/plugins','plugins/' ~ current_config.id) }}"
13 method: "{{ exists_plugin | ternary ('POST', 'PATCH') }}" 13 method: "{{ exists_plugin | ternary ('POST', 'PATCH') }}"
14 body: "{{ plugin | combine(current_body) | to_json }}" 14 body: "{{ plugin | combine(current_body) | to_json }}"
15 headers: 15 headers:
16 apikey: "{{ kong_app_admin_apikey }}" 16 apikey: "{{ server.kong_app_admin_apikey }}"
17 Content-Type: application/json 17 Content-Type: application/json
18 status_code: 200,201 18 status_code: 200,201
19 with_items: "{{ service.plugins | default([]) }}" 19 with_items: "{{ service.plugins | default([]) }}"