Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-sb-devops
Commits
f2ce970f
Commit
f2ce970f
authored
5 years ago
by
rjshrjndrn
Browse files
Options
Download
Patches
Plain Diff
cherry picking kube fixes for onboard apis
parent
233b9e12
3node
3node_bak_new
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/roles/kong-api/tasks/main.yml
+3
-18
ansible/roles/kong-api/tasks/main.yml
with
3 additions
and
18 deletions
+3
-18
ansible/roles/kong-api/tasks/main.yml
+
3
−
18
View file @
f2ce970f
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets