mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2025-10-27 08:43:05 +00:00
Update roles/kubernetes/tasks/main.yml
This commit is contained in:
@ -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:
|
apt:
|
||||||
name:
|
name:
|
||||||
- cri-o
|
- cri-o
|
||||||
- cri-tools
|
- cri-tools
|
||||||
state: present
|
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
|
#- name: Add Kubernetes APT key
|
||||||
# apt_key:
|
# apt_key:
|
||||||
|
|||||||
Reference in New Issue
Block a user