blob: 3c51e7e3092a351341657864f66fc9c9e1a04cba (
plain) (
tree)
|
|
- name: Upstream Creation
import_tasks: upstream.yml
when: service.upstream is defined
# https://docs.konghq.com/2.1.x/admin-api/#update-or-create-service
- name: Update or Create service
uri:
url: "{{ server.kong_app_admin_url }}/services/{{ service.name }}"
method: PUT
body: "{{ service_body | to_json }}"
status_code: 200,201
headers:
apikey: "{{ server.kong_app_admin_apikey }}"
Content-Type: application/json
vars:
service_body:
name: "{{ service.name }}"
url: "{{ service.url }}"
- name: Setup plugins
import_tasks: plugins.yml
- name: Setup routes
import_tasks: routes.yml
|