Robert Kaussow
bc897a9322
Reviewed-on: #4 Co-authored-by: Robert Kaussow <mail@thegeeklab.de> Co-committed-by: Robert Kaussow <mail@thegeeklab.de>
29 lines
839 B
YAML
29 lines
839 B
YAML
---
|
|
__k3s_binary: /usr/local/bin/k3s
|
|
__k3s_server_ip: "{{ hostvars[k3s_server_nodes[0]].k3s_node_ip | first }}"
|
|
|
|
__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
|
|
|
|
__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
|
|
|
|
__k3s_node_lables:
|
|
general:
|
|
node-role.kubernetes.io/k3s-node: "true"
|
|
control:
|
|
node-role.kubernetes.io/control-plane: "true"
|
|
worker:
|
|
node-role.kubernetes.io/worker: "true"
|