2018-09-29 09:06:19 +08:00
|
|
|
# to set up 'kube-master' nodes
|
2017-11-11 19:14:21 +08:00
|
|
|
- hosts: kube-master
|
|
|
|
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 }} "
|
2018-09-15 11:27:33 +08:00
|
|
|
delegate_to: "{{ groups.deploy[0] }}"
|
2018-03-16 18:23:34 +08:00
|
|
|
when: DEPLOY_MODE != "allinone"
|
|
|
|
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
|
2018-09-15 11:27:33 +08:00
|
|
|
delegate_to: "{{ groups.deploy[0] }}"
|