Update roles/kubernetes/tasks/main.yml

This commit is contained in:
2025-10-17 14:01:20 +00:00
parent c97a7a393d
commit 7df3f284f3

View File

@ -1,30 +1,29 @@
- name: Instalar CRI-O
- name: Adicionar repositório do CRI-O
become: yes
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/libcontainers-archive-keyring.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/ /"
state: present
filename: "cri-o"
- name: Adicionar chave GPG do repositório
become: yes
ansible.builtin.get_url:
url: "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/Release.key"
dest: "/usr/share/keyrings/libcontainers-archive-keyring.gpg"
mode: '0644'
- name: Atualizar cache do APT
become: yes
apt:
update_cache: yes
- name: Instalar CRI-O e ferramentas
become: yes
apt:
name:
- cri-o
- cri-tools
state: present
update_cache: yes
- name: Ativar CRI-O
systemd:
name: crio
enabled: true
state: started
- name: Configurar crictl para CRI-O
copy:
dest: /etc/crictl.yaml
content: |
runtime-endpoint: unix:///var/run/crio/crio.sock
image-endpoint: unix:///var/run/crio/crio.sock
timeout: 10
debug: false
- name: Hold Kubernetes packages
ansible.builtin.shell: |
apt-mark hold containerd
#- name: Add Kubernetes APT key
# apt_key: