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