mirror of https://github.com/easzlab/kubeasz.git
15 lines
470 B
YAML
15 lines
470 B
YAML
# to set up 'kube_master' nodes
|
|
- hosts: kube_master
|
|
roles:
|
|
- kube-master
|
|
- kube-node
|
|
tasks:
|
|
- name: Making master nodes SchedulingDisabled
|
|
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
|
|
when: "inventory_hostname not in groups['kube_node']"
|
|
ignore_errors: true
|
|
|
|
- name: Setting master role name
|
|
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
|
|
ignore_errors: true
|