用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/krmorehead/vm_builds --skill lan-node-setup命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Project architecture and design principles for vm_builds Ansible project. Includes bake vs configure patterns, two-role service model, and deployment lifecycle.
Python code conventions. Functions return errors, .env parsing strips quotes, type hints required.
Proactive validation patterns to catch issues early, prevent debugging blind, and establish testing habits before problems escalate.
基于 SOC 职业分类
正在显示 SKILL.md
| name | lan-node-setup |
| description | Add LAN hosts, env variables, inventory setup, bootstrap flow for Proxmox nodes behind OpenWrt. |
ssh root@10.10.10.1 'cat /tmp/dhcp.leases'
# or
for i in $(seq 200 220); do ping -c1 -W1 10.10.10.$i &>/dev/null && echo 10.10.10.$i; done
# Option A: SSH tunnel + GUI shell
ssh -L 8007:<node-ip>:8006 root@192.168.86.201
# Browse https://localhost:8007, open Shell, paste public keys
# Option B: ssh-copy-id through ProxyJump
ssh-copy-id -o ProxyJump=root@192.168.86.201 root@<node-ip>
<INVENTORY_HOSTNAME>_API_TOKEN= to .env/test.envssh -o ProxyJump=root@$PRIMARY_HOST root@<node-ip> hostnamePRIMARY_HOST=192.168.86.201 # Primary Proxmox host IP
HOME_API_TOKEN=cab59c9a-... # matches inventory_hostname "home"
MESH1_API_TOKEN=39d2976f-... # matches inventory_hostname "mesh1"
Convention: <INVENTORY_HOSTNAME>_API_TOKEN (uppercased, hyphens → underscores).
Dynamic resolution in group_vars:
proxmox_api_token_secret: >-
{{ lookup('env', (inventory_hostname | upper | replace('-', '_')) + '_API_TOKEN') }}
# inventory/hosts.yml
proxmox:
children:
lan_hosts:
hosts:
mesh1: {}
# inventory/host_vars/mesh1.yml
ansible_host: 10.10.10.210
ansible_user: root
Called from primary host (router_nodes):
# molecule/mesh1-infra/molecule.yml
platforms:
- name: home
groups: [proxmox, router_nodes]
- name: mesh1
groups: [proxmox, lan_hosts]
provisioner:
env:
HOME_API_TOKEN: ${HOME_API_TOKEN}
PRIMARY_HOST: ${PRIMARY_HOST}
MESH1_API_TOKEN: ${MESH1_API_TOKEN}
Test sequence: dependency → syntax → converge → verify → cleanup (no initial cleanup — baseline must exist)
LAN nodes only reachable when OpenWrt baseline running:
molecule converge # build/update baseline
molecule verify # verify both nodes
molecule converge -s mesh1-infra # infra-only on mesh1 (quick)
molecule verify -s mesh1-infra
# Clean-state validation only when needed:
molecule test # full pipeline
molecule converge # restore baseline
If node gets different IP after router reboot, static lease may not be committed:
ssh root@10.10.10.1 'uci show dhcp | grep mesh1'
# If empty, re-run bootstrap
List tokens: pveum user token list root@pam
Create: pveum user token add root@pam ansible --privsep=0
Save to test.env: MESH1_API_TOKEN=<value>