Update roles/kubernetes/tasks/main.yml

This commit is contained in:
2025-10-12 20:59:41 +00:00
parent 931e282bc1
commit 4977fc98d7

View File

@ -1,13 +1,3 @@
- name: 1 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
@ -39,16 +29,6 @@
content: |
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /
- name: 2.2 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: Install Kubernetes components
apt:
@ -63,16 +43,6 @@
ansible.builtin.shell: |
apt-mark hold kubelet kubeadm kubectl
- name: 2.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: Ativar ip_forward de forma idempotente
@ -87,16 +57,6 @@
when: ansible_facts['os_family'] == 'Debian'
changed_when: false
- name: 2.4 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: Criar arquivo de configuração sysctl para Kubernetes
@ -115,17 +75,6 @@
name: br_netfilter
state: present
- name: 2.5 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: Garantir que o módulo br_netfilter seja carregado na inicialização