aboutsummaryrefslogtreecommitdiffhomepage
path: root/tasks/kong-app.yml
diff options
context:
space:
mode:
authorGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-04-20 14:40:33 +0200
committerGaëtan Duchaussois <gaetan.duchaussois@fretlink.com>2018-04-20 14:40:33 +0200
commitd213edd127a145821e419e80104a838da421e7ca (patch)
tree33c33a4560d7b3f55eaebaad6c107f5d01768f7c /tasks/kong-app.yml
parentad5e125af59a34020943158999564af4f3a41a59 (diff)
downloadansible-kong-app-d213edd127a145821e419e80104a838da421e7ca.tar.gz
ansible-kong-app-d213edd127a145821e419e80104a838da421e7ca.tar.zst
ansible-kong-app-d213edd127a145821e419e80104a838da421e7ca.zip
add travis configuration and fix tests
Diffstat (limited to 'tasks/kong-app.yml')
-rw-r--r--tasks/kong-app.yml6
1 files changed, 4 insertions, 2 deletions
diff --git a/tasks/kong-app.yml b/tasks/kong-app.yml
index e162c09..df95f2e 100644
--- a/tasks/kong-app.yml
+++ b/tasks/kong-app.yml
@@ -9,13 +9,15 @@
9 9
10- name: Update or Create service 10- name: Update or Create service
11 uri: 11 uri:
12 url: "{{ kong_app_admin_url }}/services/{{ (kong_app_check_service.status == 404) | ternary('', kong_app_service_name) }}" 12 url: "{{ kong_app_admin_url }}/services/{{ exists_service | ternary('', kong_app_service_name) }}"
13 method: "{{ (kong_app_check_service.status == 404) | ternary('POST', 'PATCH') }}" 13 method: "{{ exists_service | ternary('POST', 'PATCH') }}"
14 body: "{{ kong_app_service_body | to_json }}" 14 body: "{{ kong_app_service_body | to_json }}"
15 status_code: 200,201 15 status_code: 200,201
16 headers: 16 headers:
17 apikey: "{{ kong_app_admin_apikey }}" 17 apikey: "{{ kong_app_admin_apikey }}"
18 Content-Type: application/json 18 Content-Type: application/json
19 vars:
20 exists_service: "{{ kong_app_check_service.status|default(404) == 404 }}"
19 21
20- name: Setup plugins 22- name: Setup plugins
21 import_tasks: plugins.yml 23 import_tasks: plugins.yml