initial commit

This commit is contained in:
2026-06-14 14:21:09 +07:00
commit 054835e2a7
17 changed files with 771 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
---
- name: Join workers to Kubernetes cluster
hosts: workers
become: true
tasks:
- name: Check if already joined
stat:
path: /etc/kubernetes/kubelet.conf
register: kubelet_conf
- name: Read join command from local file
local_action:
module: slurp
src: /tmp/k8s_join_command.sh
register: join_command_b64
when: not kubelet_conf.stat.exists
- name: Join cluster
command: "{{ join_command_b64.content | b64decode | trim }}"
when: not kubelet_conf.stat.exists