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
d8a62163
Commit
d8a62163
authored
5 years ago
by
Rajesh
Committed by
rjshrjndrn
5 years ago
Browse files
Options
Download
Patches
Plain Diff
reverting kong-9 api scheme
parent
f5afe0cb
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-consumer/tasks/main.yml
+11
-20
ansible/roles/kong-consumer/tasks/main.yml
with
11 additions
and
20 deletions
+11
-20
ansible/roles/kong-consumer/tasks/main.yml
+
11
−
20
View file @
d8a62163
...
...
@@ -15,34 +15,25 @@
-
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
:
"
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
:
Run script to save consumers
shell
:
"
python
/tmp/kong-api-scripts/kong_consumers.py
/tmp/kong_consumers.json
--kong-admin-api-url={{
kong_admin_api_url
}}"
shell
:
"
python
/tmp/kong-api-scripts/kong_consumers.py
/tmp/kong_consumers.json
--kong-admin-api-url={{
kong_admin_api_url
|d('localhost:31801')
}}"
register
:
jwt_token
-
name
:
Touch the token file
become
:
yes
file
:
path={{item}} state=touch
with_items
:
-
/tmp/jwt_token_output.txt
-
/tmp/jwt_token.txt
-
/tmp/jwt_token_output.txt
-
/tmp/jwt_token.txt
-
name
:
write to file
become
:
yes
copy
:
content="{{jwt_token.stdout}}" dest=/tmp/jwt_token_output.txt
...
...
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