feat(ansible): add K3s installation playbooks and configuration templates
这个提交包含在:
@@ -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:
|
||||
|
||||
在新议题中引用
屏蔽一个用户