xoxys.k3s/vars/main.yml

15 lines
436 B
YAML
Raw Normal View History

2022-10-03 20:58:05 +00:00
---
__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