2022-10-03 20:58:05 +00:00
|
|
|
---
|
2022-10-17 19:26:56 +00:00
|
|
|
__k3s_binary: /usr/local/bin/k3s
|
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 %}
|
2022-10-05 20:54:36 +00:00
|
|
|
--config {{ __k3s_config_dir }}/config.yaml
|
2022-10-03 20:58:05 +00:00
|
|
|
|
|
|
|
__k3s_service_file: /etc/systemd/system/k3s.service
|
2022-10-05 20:54:36 +00:00
|
|
|
|
|
|
|
__k3s_config_dir: /etc/rancher/k3s
|
|
|
|
__k3s_data_dir: /var/lib/rancher/k3s
|
|
|
|
__k3s_manifests_dir: "{{ __k3s_data_dir }}/server/manifests"
|
|
|
|
__k3s_log_dir: /var/log/rancher/k3s
|