Update roles/kube-master/tasks/main.yml

This commit is contained in:
2025-10-12 21:06:13 +00:00
parent 1e47944c6c
commit c0fae2b64c

View File

@ -1,8 +1,31 @@
- name: 3 Wait for Kubernetes API to be ready
shell: |
kubectl get --raw='/healthz'
environment:
KUBECONFIG: /home/fenix/.kube/config
register: api_health
until: api_health.rc == 0
retries: 10
delay: 6
become: yes
- name: Initialize Kubernetes master
command: kubeadm init --pod-network-cidr=192.168.3.0/16 --apiserver-advertise-address={{ ansible_default_ipv4.address }}
args:
creates: /etc/kubernetes/admin.conf
- name: 3 Wait for Kubernetes API to be ready
shell: |
kubectl get --raw='/healthz'
environment:
KUBECONFIG: /home/fenix/.kube/config
register: api_health
until: api_health.rc == 0
retries: 10
delay: 6
become: yes
- name: Verificar se o diretório .kube já existe
stat:
path: /home/fenix/.kube