2021-01-19 17:41:00 +08:00
|
|
|
# to set up 'kube_master' nodes
|
|
|
|
- hosts: kube_master
|
2017-11-11 19:14:21 +08:00
|
|
|
roles:
|
|
|
|
- kube-master
|
2018-03-16 18:23:34 +08:00
|
|
|
- kube-node
|
|
|
|
tasks:
|
2018-09-29 09:06:19 +08:00
|
|
|
- name: Making master nodes SchedulingDisabled
|
2018-06-09 22:19:20 +08:00
|
|
|
shell: "{{ bin_dir }}/kubectl cordon {{ inventory_hostname }} "
|
2021-01-19 17:41:00 +08:00
|
|
|
when: "inventory_hostname not in groups['kube_node']"
|
2018-03-16 18:23:34 +08:00
|
|
|
ignore_errors: true
|
|
|
|
|
2018-09-29 09:06:19 +08:00
|
|
|
- name: Setting master role name
|
2018-06-09 22:19:20 +08:00
|
|
|
shell: "{{ bin_dir }}/kubectl label node {{ inventory_hostname }} kubernetes.io/role=master --overwrite"
|
2018-05-22 15:57:44 +08:00
|
|
|
ignore_errors: true
|