feat(ansible): ansible 初步稳定
这个提交包含在:
@@ -0,0 +1,46 @@
|
||||
# K3s Ansible 全局变量
|
||||
---
|
||||
# ============================================
|
||||
# 敏感信息 (通过环境变量传入)
|
||||
# ============================================
|
||||
tailscale_auth_key: "{{ lookup('env', 'TAILSCALE_AUTH_KEY') }}"
|
||||
# 高可用集群的 server_url 需要指向负载均衡器地址,单节点集群则指向自身
|
||||
ha_server_url: "{{ lookup('env', 'HA_SERVER_URL') }}"
|
||||
|
||||
# ============================================
|
||||
# K3s 配置
|
||||
# ============================================
|
||||
# k3s_token 和 k3s_server_url 由 site.yml 动态设置,此处仅定义版本
|
||||
k3s_version: "v1.34.2+k3s1"
|
||||
|
||||
# ETCD 配置
|
||||
etcd_snapshot_retention: 1
|
||||
etcd_snapshot_schedule_cron: "0 0 * * *"
|
||||
etcd_snapshot_compress: true
|
||||
|
||||
# 禁用的组件
|
||||
k3s_disable_components:
|
||||
- traefik
|
||||
|
||||
# ============================================
|
||||
# 安装源配置
|
||||
# ============================================
|
||||
# 国内镜像源
|
||||
mirror_k3s_install_url: "https://rancher-mirror.rancher.cn/k3s/k3s-install.sh"
|
||||
# 官方源
|
||||
global_k3s_install_url: "https://get.k3s.io"
|
||||
|
||||
# ============================================
|
||||
# 镜像加速配置 (use_mirror: true 时启用)
|
||||
# ============================================
|
||||
registry_mirrors:
|
||||
docker.io:
|
||||
- "docker.1ms.run"
|
||||
- "docker.m.daocloud.io"
|
||||
ghcr.io:
|
||||
- "ghcr.m.daocloud.io"
|
||||
registry.k8s.io:
|
||||
- "k8s.m.daocloud.io"
|
||||
quay.io:
|
||||
- "quay.m.daocloud.io"
|
||||
|
||||
在新议题中引用
屏蔽一个用户