feat(ansible): add K3s installation playbooks and configuration templates

这个提交包含在:
rohow
2026-02-09 14:03:42 +08:00
未验证
父节点 5f85a85844
当前提交 d6bcd22ecd
修改 28 个文件,包含 815 行新增13 行删除
+54
查看文件
@@ -0,0 +1,54 @@
# K3s 集群主机清单
---
all:
vars:
# SSH 配置 (初始连接使用密码)
ansible_user: root
ansible_port: 2103
ansible_password: "{{ lookup('env', 'SSH_PASSWORD') }}"
# SSH 安全配置
ssh_new_port: 2103
ssh_pubkey: "{{ lookup('env', 'SSH_PUBKEY') | default(lookup('file', '~/.ssh/id_rsa.pub'), true) }}"
children:
# Master 节点 (Server)
masters:
hosts:
tca:
ansible_host: tca.node.dev.cm
node_hostname: tca
cluster_init: true
node_region: cn-sh
use_mirror: true
tcb:
ansible_host: tcb.node.dev.cm
node_hostname: tcb
node_region: cn-sh
use_mirror: true
tcc:
ansible_host: tcc.node.dev.cm
node_hostname: tcc
node_region: cn-sh
use_mirror: true
# Agent 节点 (Worker)
agents:
hosts:
alihk:
ansible_host: alihk.node.dev.cm
node_hostname: alihk
node_region: cn-hk
enable_lb: true
netfilter_mode: nodivert
clawhk:
ansible_host: clawhk.node.dev.cm
node_hostname: clawhk
node_region: cn-hk
# 节点分组
k3s_cluster:
children:
masters:
agents: