node installation

This commit is contained in:
Bernhard Radermacher
2025-08-27 16:51:36 +00:00
parent 459d124159
commit 0b486142a4
2 changed files with 10 additions and 2 deletions

View File

@@ -1,6 +1,5 @@
--- ---
---
- name: Install k3s Node (agent) - name: Install k3s Node (agent)
hosts: nodes hosts: nodes
gather_facts: false gather_facts: false

View File

@@ -1,5 +1,14 @@
--- ---
- name: Ensure Directory
ansible.builtin.file:
path: /etc/rancher/k3s
state: directory
owner: root
group: root
mode: "755"
become: True
- name: Copy Configuration - name: Copy Configuration
ansible.builtin.template: ansible.builtin.template:
src: config.yaml.j2 src: config.yaml.j2
@@ -10,7 +19,7 @@
become: True become: True
- name: Run Installation - name: Run Installation
ansible.builtin.command: ansible.builtin.shell:
cmd: curl -sfL https://get.k3s.io | sh -s - agent cmd: curl -sfL https://get.k3s.io | sh -s - agent
creates: /etc/systemd/system/k3s-agent.service creates: /etc/systemd/system/k3s-agent.service
become: True become: True