feat(ansible): add K3s installation playbooks and configuration templates
这个提交包含在:
@@ -0,0 +1,46 @@
|
||||
# K3s Ansible 全局变量
|
||||
---
|
||||
# ============================================
|
||||
# 敏感信息 (通过环境变量传入)
|
||||
# ============================================
|
||||
tailscale_auth_key: "{{ lookup('env', 'TAILSCALE_AUTH_KEY') }}"
|
||||
k3s_token: "{{ lookup('env', 'K3S_TOKEN') }}"
|
||||
k3s_server_url: "{{ lookup('env', 'K3S_SERVER_URL') | default('https://k3s.dev.cm:6443', true) }}"
|
||||
|
||||
# ============================================
|
||||
# K3s 配置
|
||||
# ============================================
|
||||
k3s_version: "v1.31.4+k3s1"
|
||||
k3s_tls_san: "k3s.dev.cm,k3s.fillcode.com"
|
||||
|
||||
# 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"
|
||||
|
||||
在新议题中引用
屏蔽一个用户