2016-09-02 01:01:15 +08:00
|
|
|
---
|
2016-12-20 23:44:39 +08:00
|
|
|
- name: Kubernetes Apps | Wait for kube-apiserver
|
2017-02-18 05:22:34 +08:00
|
|
|
uri:
|
2017-11-07 04:01:10 +08:00
|
|
|
url: "{{ kube_apiserver_endpoint }}/healthz"
|
|
|
|
validate_certs: no
|
|
|
|
client_cert: "{{ kube_apiserver_client_cert }}"
|
|
|
|
client_key: "{{ kube_apiserver_client_key }}"
|
2016-12-20 23:44:39 +08:00
|
|
|
register: result
|
|
|
|
until: result.status == 200
|
|
|
|
retries: 10
|
2017-10-26 16:10:33 +08:00
|
|
|
delay: 2
|
2017-01-18 05:57:34 +08:00
|
|
|
when: inventory_hostname == groups['kube-master'][0]
|
2016-12-20 23:44:39 +08:00
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | Cleanup DNS
|
|
|
|
import_tasks: tasks/cleanup_dns.yml
|
|
|
|
when:
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- upgrade
|
2018-08-08 02:53:36 +08:00
|
|
|
- dnsmasq
|
|
|
|
- coredns
|
|
|
|
- kubedns
|
2017-09-26 17:38:58 +08:00
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | CoreDNS
|
|
|
|
import_tasks: "tasks/coredns.yml"
|
2017-09-14 02:00:51 +08:00
|
|
|
when:
|
2018-03-13 19:00:05 +08:00
|
|
|
- dns_mode in ['coredns', 'coredns_dual']
|
2017-09-14 02:00:51 +08:00
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
2018-03-13 19:00:05 +08:00
|
|
|
- coredns
|
2017-06-27 12:27:25 +08:00
|
|
|
|
2018-03-13 19:00:05 +08:00
|
|
|
- name: Kubernetes Apps | KubeDNS
|
|
|
|
import_tasks: "tasks/kubedns.yml"
|
2017-07-10 19:14:28 +08:00
|
|
|
when:
|
2018-03-13 19:00:05 +08:00
|
|
|
- dns_mode in ['kubedns', 'dnsmasq_kubedns']
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- dnsmasq
|
2017-07-10 19:05:42 +08:00
|
|
|
|
2016-09-02 01:01:15 +08:00
|
|
|
- name: Kubernetes Apps | Start Resources
|
|
|
|
kube:
|
2018-02-05 16:26:54 +08:00
|
|
|
name: "{{ item.item.name }}"
|
2018-03-30 19:29:13 +08:00
|
|
|
namespace: "kube-system"
|
2018-02-05 16:26:54 +08:00
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: "{{ item.item.type }}"
|
|
|
|
filename: "{{ kube_config_dir }}/{{ item.item.file }}"
|
2017-09-05 13:23:12 +08:00
|
|
|
state: "latest"
|
2018-03-13 19:00:05 +08:00
|
|
|
with_items:
|
|
|
|
- "{{ kubedns_manifests.results | default({}) }}"
|
|
|
|
- "{{ coredns_manifests.results | default({}) }}"
|
|
|
|
- "{{ coredns_secondary_manifests.results | default({}) }}"
|
2017-09-05 13:23:12 +08:00
|
|
|
when:
|
|
|
|
- dns_mode != 'none'
|
|
|
|
- inventory_hostname == groups['kube-master'][0]
|
2018-10-17 06:33:30 +08:00
|
|
|
- not item is skipped
|
2018-03-30 00:37:32 +08:00
|
|
|
register: resource_result
|
2018-10-17 06:33:30 +08:00
|
|
|
until: resource_result is succeeded
|
2018-03-30 00:37:32 +08:00
|
|
|
retries: 4
|
|
|
|
delay: 5
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- dnsmasq
|
2018-08-08 02:53:36 +08:00
|
|
|
- coredns
|
|
|
|
- kubedns
|
2016-10-10 22:09:50 +08:00
|
|
|
|
2016-09-30 23:23:47 +08:00
|
|
|
- name: Kubernetes Apps | Netchecker
|
2018-01-29 19:37:48 +08:00
|
|
|
import_tasks: tasks/netchecker.yml
|
2016-09-30 23:23:47 +08:00
|
|
|
when: deploy_netchecker
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- netchecker
|
2017-09-10 04:38:03 +08:00
|
|
|
|
|
|
|
- name: Kubernetes Apps | Dashboard
|
2018-01-29 19:37:48 +08:00
|
|
|
import_tasks: tasks/dashboard.yml
|
2017-09-10 04:38:03 +08:00
|
|
|
when: dashboard_enabled
|
2017-10-05 15:43:04 +08:00
|
|
|
tags:
|
|
|
|
- dashboard
|