mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-25 12:15:51 +01:00
fix(start): annoying behaviour where k3s won't start as a single node in ha etcd #152
This commit is contained in:
parent
4c20fd3f0b
commit
677db09b4a
@ -17,6 +17,11 @@
|
||||
- include_tasks: install-k3s-node.yml
|
||||
when: k3s_build_cluster
|
||||
|
||||
- name: Determine if the systems are already clustered
|
||||
ansible.builtin.stat:
|
||||
path: "{{ k3s_token_location }}"
|
||||
register: k3s_token_cluster_check
|
||||
|
||||
- name: Ensure k3s initial control plane server is started
|
||||
ansible.builtin.systemd:
|
||||
name: k3s
|
||||
@ -29,4 +34,5 @@
|
||||
- not ansible_check_mode
|
||||
when: (k3s_control_node and k3s_controller_list | length == 1)
|
||||
or (k3s_primary_control_node and k3s_controller_list | length > 1)
|
||||
or k3s_token_cluster_check.stat.exists
|
||||
become: "{{ k3s_become_for_systemd | ternary(true, false, k3s_become_for_all) }}"
|
||||
|
Loading…
Reference in New Issue
Block a user