Files
Deploy-Laboratory/ansible/group_vars/all.yml
2026-03-27 16:58:41 +08:00

45 lines
2.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
# 使用 root SSH 连接setup-k3s-workers-ssh.sh 已将同一公钥写入各节点 root
ansible_user: root
timezone: "Asia/Shanghai"
# k3s 相关
k3s_version: "" # 为空表示用 get.k3s.io 默认最新
k3s_data_dir: "/storage"
k3s_server_ip: "192.168.2.61"
# 安装 k3s 前校验:/storage 为挂载点且与 / 不同设备(实验室 10G+32G 建议 true「目录式假 /storage」旧环境可 false
k3s_verify_storage_mount: true
# 可选:由 playbooks/verify/01-06.yml-e k3s_do_prepare_storage=true对第二块整盘分区、格式化并挂载到 k3s_data_dir会清空该盘见 01-06
k3s_prepare_storage: false
# k3s_data_disk_device: "/dev/vdb"
# NVMe 整盘一般为 /dev/nvme0n1首分区为 /dev/nvme0n1p1playbook 会按设备名自动加 1 或 p1
# Longhorn Helmplaybooks/verify/03-07.yml
longhorn_chart_version: "1.7.2"
longhorn_install_node_packages: true
# 仅在 Helm 与残留 CRD 严重冲突时设 true默认 false。装前删光 CRD 可能导致 helm install 报 CRD not found
longhorn_force_crd_reset: false
# 是否在 longhorn-install 末尾应用本仓库 local-path 实验室 ConfigMap
longhorn_apply_local_path_lab: false
# 可选:是否管理 /etc/hosts、firewalld 基线
k3s_manage_hosts: true
k3s_manage_firewalld: true
#(入口节点选择已改为手动 kubectl 打标,不再通过 Ansible 管理 Traefik 入口标签)
## 角色标签(自动打标开关)
# 若希望 Ansible 在安装后自动为节点打 control-plane / worker 角色标签,用于 02-05 矩阵等场景,
# 可开启此开关;默认 true 表示自动按 inventory 中的 k3s_server / k3s_worker 分组打标。
# 如需完全手动管理角色标签,可改为 false并参考 `01-02-k3s-工作节点.md` 中的 kubectl 示例。
k3s_manage_role_labels: true
## CoreDNS 上游 DNSACME 需集群内解析 Let's Encrypt
# 宿主机若使用 IPv6 DNS/etc/resolv.confK3s Pod 网络仅 IPv4 时无法访问,导致 ACME 申请失败。
# 将 CoreDNS forward 改为明确 IPv4 地址可规避。见 docs/03-02 常见问题。
k3s_manage_coredns: true
coredns_forward_servers: "223.5.5.5 8.8.8.8"