14 lines
		
	
	
		
			497 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			497 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| ---
 | |
| - name: Initialize the controlplane
 | |
|   hosts: root_master
 | |
|   become: yes
 | |
|   become_method: sudo
 | |
|   become_user: root
 | |
|   tasks:
 | |
|   - name: Initialize the control plane
 | |
|     shell: kubeadm init --pod-network-cidr={{ POD_NETWORK_CIDR }} --control-plane-endpoint "{{ APISERVER_VIP}}:{{ APISERVER_PORT }}" --upload-certs >> /etc/kubernetes/setup.out
 | |
|       args: chdir $HOME
 | |
|       creates: /etc/kubernetes/setup.out
 | |
|   # - name: Reboot machine to finaliza presetup
 | |
|   #   reboot:
 | |
|   #     reboot_timeout: 3600 |