Commit f2ce970f authored by rjshrjndrn's avatar rjshrjndrn
Browse files

cherry picking kube fixes for onboard apis

No related merge requests found
Showing with 3 additions and 18 deletions
+3 -18
......@@ -12,26 +12,11 @@
- name: Copy kong api scripts
copy: src=static-files/kong-api-scripts dest=/tmp mode=0755
#- name: "Ensure kong_admin_api_url is available before running the scripts"
# uri:
# url: "{{ kong_admin_api_url }}/status"
# status_code: 200
# register: result
# until: result.status == 200
# retries: 60
# delay: 5
- name: Extracting where the host in which api manager is running
command: bash -lc "sudo docker service ps api-manager_kong | grep Runn | head -n1 | awk '{print $4}'"
register: kong_running_host
delegate_to: "{{groups['swarm-manager-1'][0]}}"
- set_fact:
kong_admin_api_url: "http://{{kong_running_host.stdout}}:8001"
- name: waiting for 30 seconds for api manager to be fully functional
pause:
seconds: 30
## Have to pass kong_api address as ip extravars
- name: Run script to save apis
shell: "python /tmp/kong-api-scripts/kong_apis.py /tmp/kong_apis.json --kong-admin-api-url={{ kong_admin_api_url }}"
shell: "python /tmp/kong-api-scripts/kong_apis.py /tmp/kong_apis.json --kong-admin-api-url={{ kong_admin_api_url | d('localhost:31801') }}"
ignore_errors: yes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment