← スキル一覧に戻る

sync-tailscale
by julianh2o
Infrastructure for the fairgrounds
⭐ 0🍴 0📅 2026年1月24日
SKILL.md
name: sync-tailscale description: Sync Tailscale IP addresses from API to inventory.yaml
Sync Tailscale IPs
Fetch Tailscale device IPs and update inventory.yaml with tailscale_address attributes.
Task
- Fetch devices from Tailscale API:
curl -H "Authorization: Bearer {{ tailscale_api_key }}" \
https://api.tailscale.com/api/v2/tailnet/-/devices | jq .
-
Extract hostname → IPv4 mapping from the devices array
-
Update inventory.yaml with tailscale_address attributes for matching hosts
Inventory Structure
File: inventory.yaml
Format:
groupname:
hosts:
hostname:
ansible_host: 192.168.x.x
tailscale_address: 100.x.x.x # Add or update this
exporter_port: 9100
Rules
- Match on hostname (case-insensitive)
- Use IPv4 address (not IPv6)
- Add tailscale_address after ansible_host if missing
- Update existing tailscale_address if IP changed
- Preserve YAML formatting and structure
- Report what was added/updated
API Key
The API key is stored encrypted in secrets.yml as tailscale_api_key. Decrypt with:
ansible-vault view secrets.yml | grep -A 5 tailscale_api_key
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です