2018-09-29 09:06:19 +08:00
|
|
|
# [optional] to synchronize time of nodes with 'chrony'
|
2018-08-17 09:18:55 +08:00
|
|
|
- hosts: all
|
|
|
|
roles:
|
|
|
|
- { role: chrony, when: "hostvars[groups.deploy[0]]['NTP_ENABLED'] == 'yes'" }
|
|
|
|
|
2018-09-29 09:06:19 +08:00
|
|
|
# to create CA, kubeconfig, kube-proxy.kubeconfig etc. on 'deploy' node
|
2017-11-11 19:14:21 +08:00
|
|
|
- hosts: deploy
|
|
|
|
roles:
|
2017-12-08 16:17:16 +08:00
|
|
|
- deploy
|
2017-11-11 19:14:21 +08:00
|
|
|
|
2018-09-29 09:06:19 +08:00
|
|
|
# prepare tasks for all nodes
|
2017-11-21 11:27:06 +08:00
|
|
|
- hosts:
|
2018-03-02 08:40:29 +08:00
|
|
|
- kube-master
|
|
|
|
- kube-node
|
2017-11-25 21:31:00 +08:00
|
|
|
- deploy
|
2017-11-21 11:27:06 +08:00
|
|
|
- etcd
|
2017-12-15 17:27:56 +08:00
|
|
|
- lb
|
2017-11-11 19:14:21 +08:00
|
|
|
roles:
|
|
|
|
- prepare
|
|
|
|
|
2018-09-29 09:06:19 +08:00
|
|
|
# [optional] to install loadbalance service, only needed by multi-master cluster
|
2017-11-11 19:14:21 +08:00
|
|
|
- hosts: lb
|
|
|
|
roles:
|
|
|
|
- lb
|