Update roles/kubernetes/tasks/main.yml

This commit is contained in:
2025-10-20 12:51:59 +00:00
parent 5401347945
commit 34cc967d0b

View File

@ -4,41 +4,41 @@
state: stopped
enabled: false
- name: Disable SWAP
- name: Disable SWAP
shell: |
swapoff -a
- name: Disable SWAP in fstab
- name: Disable SWAP in fstab
lineinfile:
path: /etc/fstab
regexp: '^.*swap.*$'
line: '#\0'
backrefs: yes
- name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1
- name: ensure net.bridge.bridge-nf-call-ip6tables is set to 1
sysctl:
name: net.bridge.bridge-nf-call-iptables
value: '1'
state: present
reload: yes
- name: Installation of apt-utils
- name: Installation of apt-utils
apt:
name: apt-transport-https
state: present
update_cache: yes
- name: Adding Docker GPG key
- name: Adding Docker GPG key
ansible.builtin.apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
- name: Adding Docker Repository
- name: Adding Docker Repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable
state: present
- name: Installation of Docker
- name: Installation of Docker
apt:
name: "{{ item }}"
state: present
@ -48,12 +48,12 @@
- containerd.io
- docker-compose
- name: Setting value of SystemdCgroup
- name: Setting value of SystemdCgroup
shell: |
containerd config default | sudo tee /etc/containerd/config.toml | grep SystemdCgroup
sed -i 's/SystemdCgroup = false/SystemdCgroup = true/g' /etc/containerd/config.toml
- name : Starting Service of Docker
- name : Starting Service of Docker
service:
name: docker
state: started