mirror of https://github.com/easzlab/kubeasz.git
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
- hosts: etcd
|
|
tasks:
|
|
- name: starting etcd cluster
|
|
service: name=etcd state=started enabled=yes
|
|
|
|
- hosts: kube-master
|
|
tasks:
|
|
- name: starting kube-master services
|
|
service: name={{ item }} state=started enabled=yes
|
|
with_items:
|
|
- kube-apiserver
|
|
- kube-controller-manager
|
|
- kube-scheduler
|
|
|
|
- hosts:
|
|
- kube-master
|
|
- kube-node
|
|
tasks:
|
|
- name: starting docker
|
|
service: name=docker state=started enabled=yes
|
|
when: "CONTAINER_RUNTIME == 'docker'"
|
|
|
|
- name: starting containerd
|
|
service: name=containerd state=started enabled=yes
|
|
when: "CONTAINER_RUNTIME == 'containerd'"
|
|
|
|
- name: starting haproxy on kube-node
|
|
service: name=haproxy state=started enabled=yes
|
|
when:
|
|
- "inventory_hostname not in groups['kube-master']"
|
|
- "groups['kube-master']|length > 1"
|
|
|
|
- name: starting kube-node services
|
|
service: name={{ item }} state=started enabled=yes
|
|
with_items:
|
|
- kubelet
|
|
- kube-proxy
|
|
|
|
- hosts: ex-lb
|
|
tasks:
|
|
- name: starting external loadbalance
|
|
service: name={{ item }} state=started enabled=yes
|
|
with_items:
|
|
- haproxy
|
|
- keepalived
|