3 url: "{{ kong_app_admin_url }}/services/{{ service.name }}/routes"
7 apikey: "{{ kong_app_admin_apikey }}"
8 register: kong_app_service_routes_check
12 url: "{{ kong_app_admin_url }}/services/{{ service.name }}/routes"
14 body: "{{ route | to_json }}"
16 apikey: "{{ kong_app_admin_apikey }}"
17 Content-Type: application/json
19 with_items: "{{ service.routes | default([]) }}"
23 - name: Delete old routes
25 url: "{{ kong_app_admin_url }}/routes/{{ item.id }}"
28 apikey: "{{ kong_app_admin_apikey }}"
30 with_items: "{{ kong_app_service_routes_check.json.data }}"
31 when: not kong_app_service_routes_check is skipped