--- # Part of role: k3s-agent # Called by: ansible/playbooks/join-debian-agent.yaml # Description: Installs K3s in agent mode, joins the cluster, and labels the node as storage. - name: Download and install K3s agent ansible.builtin.shell: cmd: > curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION={{ k3s_version }} K3S_URL={{ k3s_server_url }} K3S_TOKEN={{ k3s_node_token }} sh - creates: /usr/local/bin/k3s - name: Ensure K3s agent service is running ansible.builtin.service: name: k3s-agent state: started enabled: true become: true - name: Label node as storage ansible.builtin.shell: cmd: > k3s kubectl label node nik-debian node-role=storage --overwrite delegate_to: minisforum become: true changed_when: false