mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 16:53:04 +00:00
Update roles/kubernetes/tasks/main.yml
This commit is contained in:
@ -1,20 +1,13 @@
|
||||
|
||||
|
||||
- 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: Install containerd
|
||||
apt:
|
||||
name: containerd
|
||||
state: present
|
||||
update_cache: no
|
||||
|
||||
- name: Hold Kubernetes packages
|
||||
ansible.builtin.shell: |
|
||||
apt-mark hold containerd
|
||||
|
||||
#- name: Add Kubernetes APT key
|
||||
# apt_key:
|
||||
@ -40,16 +33,7 @@
|
||||
deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /
|
||||
|
||||
|
||||
- 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: Install Kubernetes components
|
||||
apt:
|
||||
name:
|
||||
@ -77,16 +61,6 @@
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
changed_when: false
|
||||
|
||||
- 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: Criar arquivo de configuração sysctl para Kubernetes
|
||||
@ -106,17 +80,6 @@
|
||||
state: present
|
||||
|
||||
|
||||
- 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: Garantir que o módulo br_netfilter seja carregado na inicialização
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/modules-load.d/k8s.conf
|
||||
|
||||
Reference in New Issue
Block a user