diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-04-20 10:04:41 +0200 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2018-04-20 10:04:41 +0200 |
commit | 1a33ca3184dbea838ea083a7cf026cf5884dc3f4 (patch) | |
tree | c097cc0071eb765584897f1da6487702893ad6f8 /tasks/kong-app.yml | |
parent | 530dddec969df385e9aa29af0917f6ca97094d68 (diff) | |
download | ansible-kong-app-1a33ca3184dbea838ea083a7cf026cf5884dc3f4.tar.gz ansible-kong-app-1a33ca3184dbea838ea083a7cf026cf5884dc3f4.tar.zst ansible-kong-app-1a33ca3184dbea838ea083a7cf026cf5884dc3f4.zip |
initial version
Diffstat (limited to 'tasks/kong-app.yml')
-rw-r--r-- | tasks/kong-app.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tasks/kong-app.yml b/tasks/kong-app.yml new file mode 100644 index 0000000..d50c193 --- /dev/null +++ b/tasks/kong-app.yml | |||
@@ -0,0 +1,24 @@ | |||
1 | - name: Check if service exists | ||
2 | uri: | ||
3 | url: "{{ kong_app_admin_url }}/services/{{ kong_app_service_name }}" | ||
4 | method: GET | ||
5 | headers: | ||
6 | apikey: "{{ kong_app_admin_apikey }}" | ||
7 | status_code: 200,404 | ||
8 | register: kong_app_check_service | ||
9 | |||
10 | #- name: Update or Create service | ||
11 | # uri: | ||
12 | # url: "{{ kong_app_admin_url }}/services/{{ kong_app_service_name }}" | ||
13 | # method: "{{ (kong_app_check_service.status_code == 404) | ternary ('POST', 'PATCH') }}" | ||
14 | # body: "{{ kong_app_service_body | to_json }}" | ||
15 | # headers: | ||
16 | # apikey: "{{ kong_app_admin_apikey }}" | ||
17 | # Content-Type: application/json | ||
18 | # status_code: 200,201 | ||
19 | |||
20 | - name: Setup plugins | ||
21 | import_tasks: plugins.yml | ||
22 | |||
23 | - name: Setup routes | ||
24 | import_tasks: routes.yml | ||