mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Fix k3s_server_location only working on default
- K3s has some absolute paths set in various places which cannot be changed. Using a symbolic link was the easiest fix. This is nice for running K3S on SBC that must boot to SD but K3S data should be stored on a faster drive. - Other changes are for making the site playbook replayable without resetting the cluster. Ideally you can rerun it to check existing nodes or to add new ones. Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
committed by
Derek Nola
parent
7cc70ad609
commit
8484c015d6
@@ -52,3 +52,17 @@
|
||||
path: /etc/sudoers
|
||||
validate: 'visudo -cf %s'
|
||||
when: ansible_distribution in ['CentOS', 'Red Hat Enterprise Linux','RedHat']
|
||||
|
||||
- name: Make k3s directory
|
||||
ansible.builtin.file:
|
||||
path: "/var/lib/rancher"
|
||||
mode: 0755
|
||||
state: directory
|
||||
|
||||
- name: Create symlink
|
||||
ansible.builtin.file:
|
||||
dest: /var/lib/rancher/k3s
|
||||
src: "{{ k3s_server_location }}"
|
||||
force: true
|
||||
state: link
|
||||
when: k3s_server_location != "/var/lib/rancher/k3s"
|
||||
|
||||
Reference in New Issue
Block a user