mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2025-12-25 00:12:37 +01:00
Reorganize server tasks, copy config to local
- Inital server starts first so it can grab the token for other servers and copy the config to localhost - More cleanup of agent/server naming scheme Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
committed by
Derek Nola
parent
df67c61ba5
commit
5b3e2a5db6
@@ -1,12 +1,2 @@
|
||||
---
|
||||
k3s_server_location: /var/lib/rancher/k3s
|
||||
server_init_args: >-
|
||||
{% if groups['server'] | length > 1 %}
|
||||
--token {{ k3s_token }}
|
||||
{% if ansible_host == hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) %}
|
||||
--cluster-init
|
||||
{% else %}
|
||||
--server https://{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}:{{ api_port }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ extra_server_args | default('') }}
|
||||
|
||||
Reference in New Issue
Block a user