mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-01-31 17:19:17 -03:30
Use first kube-master to check results
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
- name: Get netchecker agents
|
||||
uri: url=http://localhost:{{netchecker_port}}/api/v1/agents/ return_content=yes
|
||||
run_once: true
|
||||
delegate_to: "{{groups['kube-node'][0]}}"
|
||||
delegate_to: "{{groups['kube-master'][0]}}"
|
||||
register: agents
|
||||
retries: 6
|
||||
delay: "{{ agent_report_interval }}"
|
||||
@@ -54,12 +54,11 @@
|
||||
|
||||
- debug: var=agents.content|from_json
|
||||
failed_when: not agents|success and not agents.content=='{}'
|
||||
delegate_to: "{{groups['kube-node'][0]}}"
|
||||
run_once: true
|
||||
|
||||
|
||||
- name: Check netchecker status
|
||||
uri: url=http://localhost:{{netchecker_port}}/api/v1/connectivity_check status_code=200 return_content=yes
|
||||
delegate_to: "{{groups['kube-node'][0]}}"
|
||||
delegate_to: "{{groups['kube-master'][0]}}"
|
||||
run_once: true
|
||||
register: result
|
||||
retries: 3
|
||||
@@ -70,7 +69,6 @@
|
||||
|
||||
- debug: var=result.content|from_json
|
||||
failed_when: not result|success
|
||||
delegate_to: "{{groups['kube-node'][0]}}"
|
||||
run_once: true
|
||||
when: not agents.content=='{}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user