Move k3s_server_location to inventory vars

- All environemt variables are now in one place
- Add --data-dir option to agent and init  service

Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
Nicholas Malcolm authored and Derek Nola committed 2023-11-08 10:23:56 -08:00
1 parent 5b3e2a5db6
commit cd725780f5
5 files changed
+7 -12

No files matched your search

+1 -6
View File
@@ -1,9 +1,4 @@
---
- name: Clean previous runs of k3s-init
command: systemctl reset-failed k3s-init
failed_when: false
changed_when: false
- name: Disable services
ansible.builtin.systemd:
name: "{{ item }}"
@@ -40,7 +35,7 @@
- "{{ systemd_dir }}/k3s-agent.service"
- /etc/rancher/k3s
- /var/lib/kubelet
- /var/lib/rancher/k3s
- "{{ k3s_server_location }}"
- name: Systemd daemon reload
ansible.builtin.systemd: