Update 'k8s/initialize.yml'

master
alecsandru 9 months ago
parent 499dbb4b22
commit 7b5e868325
  1. 18
      k8s/initialize.yml

@ -1,4 +1,17 @@
---
- name: Stop loadbalancers on other masters
hosts: masters
become: yes
become_method: sudo
become_user: root
tasks:
- name: Stopping services
service:
name: "{{ item }}"
state: stopped
with_items:
- "haproxy"
- "keepalived"
- name: Initialize the controlplane
hosts: root_master
become: yes
@ -12,6 +25,11 @@
args:
chdir: $HOME
creates: /etc/kubernetes/setup.out
- name: Extract Control Plane token
shell: cat /etc/kubernetes/setup.out | grep -e " kubeadm join" -e "--discovery-token" -e "--control-plane"
register: K8S_CP_JOIN_COMMAND
msg: {{ K8S_CP_JOIN_COMMAND }}
# - name: Reboot machine to finaliza presetup
# reboot:
# reboot_timeout: 3600
Loading…
Cancel
Save