15 lines
436 B
YAML
15 lines
436 B
YAML
|
---
|
||
|
__k3s_server_ip: "{{ hostvars[k3s_server_nodes[0]].k3s_node_ip }}"
|
||
|
|
||
|
__k3s_server_init_args: >-
|
||
|
{% if k3s_server_nodes | length > 1 %}
|
||
|
{% if ansible_hostname == hostvars[k3s_server_nodes[0]]['ansible_hostname'] %}
|
||
|
--cluster-init
|
||
|
{% else %}
|
||
|
--server https://{{ __k3s_server_ip }}:6443
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
--config {{ k3s_config_dir }}/config.yaml
|
||
|
|
||
|
__k3s_service_file: /etc/systemd/system/k3s.service
|