This commit is contained in:
2026-02-23 22:19:46 +01:00
parent e4b036da20
commit eb53ed12d9

View File

@@ -1,7 +1,15 @@
- name: Install Kubernetes on Ubuntu 24 - name: Install Kubernetes on Ubuntu 24
become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}" become: "{{ 'no' if inventory_hostname == 'nas.home.lan' else 'yes' }}"
block: block:
- name: Remove multiple files
file:
path: "{{ item }}"
state: absent
loop:
- /etc/apt/sources.list.d/docker.list
- /etc/apt/keyrings/docker.gpg
- /etc/apt/trusted.gpg.d/containerd.gpg
- /etc/apt/trusted.gpg.d/docker.gpg
- name: Update apt cache - name: Update apt cache
apt: apt:
update_cache: yes update_cache: yes
@@ -16,16 +24,8 @@
regexp: '.*swap.*' regexp: '.*swap.*'
replace: '' replace: ''
- name: Remove multiple files
file:
path: "{{ item }}"
state: absent
loop:
- /etc/apt/sources.list.d/docker.list
- /etc/apt/keyrings/docker.gpg
- /etc/apt/trusted.gpg.d/containerd.gpg
- /etc/apt/trusted.gpg.d/docker.gpg
- name: Enable kernel modules - name: Enable kernel modules
copy: copy:
dest: /etc/modules-load.d/k8s.conf dest: /etc/modules-load.d/k8s.conf