feat: add ansible-lint and yamlfmt

This commit is contained in:
2026-06-24 00:32:59 +01:00
parent 71214883fb
commit 687e061b93
14 changed files with 36 additions and 44 deletions
-9
View File
@@ -6,7 +6,6 @@
name: net.ipv4.ip_forward
value: 1
sysctl_set: true
- name: Enable Kernel Modules
community.general.modprobe:
name: "{{ item }}"
@@ -14,7 +13,6 @@
loop:
- br_netfilter
- dm-crypt
- name: Ensure /sys mount is set to shared for container runtimes
block:
- name: Remount /sys as shared immediately
@@ -24,7 +22,6 @@
- /sys
- /run
changed_when: false
- name: Create Alpine local.d script for permanent shared mount
ansible.builtin.copy:
dest: /etc/local.d/mount-shared.start
@@ -36,20 +33,17 @@
owner: root
group: root
mode: '0755'
- name: Ensure Alpine local service is enabled on boot
ansible.builtin.service:
name: local
enabled: true
runlevel: default
- name: Install tools
ansible.builtin.package:
name: "{{ item }}"
state: present
loop:
- htop
- name: Install kubectl, kubelet, kubeadm and containerd
ansible.builtin.package:
name: "{{ item }}"
@@ -62,7 +56,6 @@
- cni-plugins
- helm
- open-iscsi
- name: Start kubelet and containerd
ansible.builtin.service:
name: "{{ item }}"
@@ -72,14 +65,12 @@
- kubelet
- containerd
- iscsid
- name: Add /opt/cni/bin to containerd CNI binary directories
ansible.builtin.replace:
path: /etc/containerd/config.toml
regexp: "bin_dirs = \\['/usr/libexec/cni'\\]"
replace: "bin_dirs = ['/opt/cni/bin', '/usr/libexec/cni']"
notify: Restart containerd
handlers:
- name: Restart containerd
ansible.builtin.service: