This commit is contained in:
DeveloperDurp 2026-02-08 06:36:31 -06:00
parent da6e152366
commit f55728cc96
2 changed files with 4 additions and 4 deletions

View file

@ -1,11 +1,11 @@
---
ansible_user: root
server_init_args: >-
{% if groups['master'] | length > 1 %}
{% if ansible_hostname == hostvars[groups['master'][0]]['ansible_hostname'] %}
{% if groups['master_group'] | length > 1 %}
{% if ansible_hostname == hostvars[groups['master_group'][0]]['ansible_hostname'] %}
--cluster-init
{% else %}
--server https://{{ hostvars[groups['master'][0]].k3s_node_ip }}:6443
--server https://{{ hostvars[groups['master_group'][0]].k3s_node_ip }}:6443
{% endif %}
--token {{ k3s_token }}
{% endif %}