diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-04-23 10:35:56 +0200 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-04-23 10:41:27 +0200 |
commit | 767c0e538b6b7c751784444fd6c676668e3a1b01 (patch) | |
tree | 6708c8474e2a2749f737817840b0f050d5236e44 /tasks/plugins.yml | |
parent | 0682b86504faf606b9017bc82bdbabd3af237db6 (diff) | |
download | ansible-kong-app-767c0e538b6b7c751784444fd6c676668e3a1b01.tar.gz ansible-kong-app-767c0e538b6b7c751784444fd6c676668e3a1b01.tar.zst ansible-kong-app-767c0e538b6b7c751784444fd6c676668e3a1b01.zip |
setup an array of services
Diffstat (limited to 'tasks/plugins.yml')
-rw-r--r-- | tasks/plugins.yml | 6 |
1 files changed, 3 insertions, 3 deletions
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 @@ | |||
1 | - name: Get plugins | 1 | - name: Get plugins |
2 | uri: | 2 | uri: |
3 | url: "{{ kong_app_admin_url }}/services/{{ kong_app_service_name }}/plugins" | 3 | url: "{{ 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: |
@@ -9,14 +9,14 @@ | |||
9 | 9 | ||
10 | - name: Setup plugin | 10 | - name: Setup plugin |
11 | uri: | 11 | uri: |
12 | url: "{{ kong_app_admin_url }}/{{ exists_plugin | ternary('services/' ~ kong_app_service_name ~ '/plugins','plugins/' ~ current_config.id) }}" | 12 | url: "{{ 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: "{{ 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: "{{ kong_app_plugins }}" | 19 | with_items: "{{ service.plugins | default([]) }}" |
20 | loop_control: | 20 | loop_control: |
21 | loop_var: plugin | 21 | loop_var: plugin |
22 | vars: | 22 | vars: |