Set up ansible scripts to install k3s, helm, and ArgoCD in a Debian-based node

This commit is contained in:
2025-08-15 21:06:56 -03:00
parent 700b770248
commit f6866e1a11
8 changed files with 90 additions and 1 deletions
+42
View File
@@ -0,0 +1,42 @@
- name: Set up k3s on dev node
hosts: dev
become: true
tasks:
- name: Install curl
ansible.builtin.apt:
name: curl
state: present
when: ansible_os_family == "Debian"
- name: Download k3s install script
ansible.builtin.get_url:
url: https://get.k3s.io
dest: /tmp/k3s_install.sh
mode: '0755'
- name: Run k3s installer
ansible.builtin.command: /tmp/k3s_install.sh
args:
creates: /usr/local/bin/k3s
- name: Ensure k3s service is started and enabled
ansible.builtin.systemd:
name: k3s
enabled: true
state: started
- name: Install Python Kubernetes client
ansible.builtin.apt:
name: python3-kubernetes
state: present
- name: Download helm install script
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
dest: /tmp/get_helm.sh
mode: '0755'
- name: Run helm installer
ansible.builtin.command: /tmp/get_helm.sh
args:
creates: /usr/local/bin/helm