feat(ansible): ansible 优化
这个提交包含在:
@@ -5,12 +5,13 @@
|
||||
# ============================================
|
||||
tailscale_auth_key: "{{ lookup('env', 'TAILSCALE_AUTH_KEY') }}"
|
||||
# 高可用集群的 server_url 需要指向负载均衡器地址,单节点集群则指向自身
|
||||
ha_server_url: "{{ lookup('env', 'HA_SERVER_URL') }}"
|
||||
ha_server_url: "{{ lookup('env', 'HA_SERVER_URL') | default('', true) }}"
|
||||
|
||||
# ============================================
|
||||
# K3s 配置
|
||||
# ============================================
|
||||
# k3s_token 和 k3s_server_url 由 site.yml 动态设置,此处仅定义版本
|
||||
# K3s Server URL (优先使用 HA_SERVER_URL,否则动态使用 init 节点地址)
|
||||
k3s_server_url: "{{ ha_server_url if (ha_server_url | length > 0) else '' }}"
|
||||
k3s_version: "v1.34.2+k3s1"
|
||||
|
||||
# ETCD 配置
|
||||
|
||||
@@ -35,16 +35,62 @@ all:
|
||||
# Agent 节点 (Worker)
|
||||
agents:
|
||||
hosts:
|
||||
tce:
|
||||
ansible_host: tce.node.dev.cm
|
||||
node_hostname: tce
|
||||
node_region: cn-sh
|
||||
use_mirror: true
|
||||
tcd:
|
||||
ansible_host: tcd.node.dev.cm
|
||||
node_hostname: tcd
|
||||
node_region: cn-sh
|
||||
use_mirror: true
|
||||
tchk:
|
||||
ansible_host: tchk.node.dev.cm
|
||||
node_hostname: tchk
|
||||
node_region: cn-hk
|
||||
enable_lb: true
|
||||
tthk:
|
||||
ansible_host: tthk.node.dev.cm
|
||||
node_hostname: tthk
|
||||
node_region: cn-hk
|
||||
enable_lb: true
|
||||
alihk:
|
||||
ansible_host: alihk.node.dev.cm
|
||||
node_hostname: alihk
|
||||
node_region: cn-hk
|
||||
enable_lb: true
|
||||
netfilter_mode: nodivert
|
||||
alihka:
|
||||
ansible_host: alihka.node.dev.cm
|
||||
node_hostname: alihka
|
||||
node_region: cn-hk
|
||||
netfilter_mode: nodivert
|
||||
hwhk:
|
||||
ansible_host: hwhk.node.dev.cm
|
||||
node_hostname: hwhk
|
||||
node_region: cn-hk
|
||||
enable_lb: true
|
||||
netfilter_mode: nodivert
|
||||
hwsg:
|
||||
ansible_host: hwsg.node.dev.cm
|
||||
node_hostname: hwsg
|
||||
node_region: sg-sg
|
||||
netfilter_mode: nodivert
|
||||
hwa:
|
||||
ansible_host: hwa.node.dev.cm
|
||||
node_hostname: hwa
|
||||
node_region: cn-sh
|
||||
use_mirror: true
|
||||
netfilter_mode: nodivert
|
||||
clawhk:
|
||||
ansible_host: clawhk.node.dev.cm
|
||||
node_hostname: clawhk
|
||||
node_region: cn-hk
|
||||
clawjp:
|
||||
ansible_host: clawjp.node.dev.cm
|
||||
node_hostname: clawjp
|
||||
node_region: jp-tyo
|
||||
|
||||
# 节点分组
|
||||
k3s_cluster:
|
||||
|
||||
在新议题中引用
屏蔽一个用户