1
0
Fork
You've already forked switch-manager
0
No description
Find a file
System administrator a5d1adf5f1 new
2026年05月08日 11:49:46 +02:00
lib new 2026年05月08日 11:49:46 +02:00
secrets new 2026年05月08日 11:49:46 +02:00
switches new 2026年05月08日 11:49:46 +02:00
.gitignore new 2026年05月08日 11:49:46 +02:00
.woodpecker.yml new 2026年05月08日 11:49:46 +02:00
deploy.py new 2026年05月08日 11:49:46 +02:00
init.md new 2026年05月08日 11:49:46 +02:00
port_types.yml new 2026年05月08日 11:49:46 +02:00
README.md new 2026年05月08日 11:49:46 +02:00
requirements.txt new 2026年05月08日 11:49:46 +02:00
shell.nix new 2026年05月08日 11:49:46 +02:00
vlans.yml new 2026年05月08日 11:49:46 +02:00

network-iac

Infrastructure-as-Code für HP 1820 Switches im Heimnetz. Konfiguration in YAML, Passwörter SOPS-verschlüsselt, Deployment via Woodpecker CI.

Struktur

network-iac/
├── vlans.yml # Globale VLAN-Definitionen (Single Source of Truth)
├── switches/ # Ein File pro Switch
│ ├── sw-vt1-01.yml
│ ├── sw-vt2-01.yml
│ └── sw-vt3-01.yml
├── secrets/ # AGE-verschlüsselte Passwörter (commitbar)
│ ├── sw-vt1-01.sops.yml
│ ├── sw-vt2-01.sops.yml
│ └── sw-vt3-01.sops.yml
├── lib/hp1820/ # HP 1820 Driver
├── deploy.py # Deploy-CLI
├── .sops.yaml # SOPS-Konfiguration (AGE Public Key)
├── .woodpecker.yml # CI/CD Pipeline
└── init.md # Ersteinrichtung & Key-Rotation

Benutzung

# Dry-Run — zeigt was sich ändern würde
SOPS_AGE_KEY_FILE=secrets/age.key python deploy.py --dry-run
# Einzelnen Switch deployen
SOPS_AGE_KEY_FILE=secrets/age.key python deploy.py --switch sw-vt1-01.yml
# Alle Switches deployen
SOPS_AGE_KEY_FILE=secrets/age.key python deploy.py

CI/CD

Event Branch Aktion
Push / PR beliebig Dry-Run
Push main Deploy

Woodpecker-Secret sops_age_key muss hinterlegt sein (Inhalt von secrets/age.key).

Ersteinrichtung & Key-Rotation

init.md

Verwendete Bibliotheken

Bibliothek Quelle Commit
lib/netgear_gs108ev3/ PotatoMania/prosafe-vlan-manager 8ce87e6 (Jul 23, 2025)
lib/hp1820/ cx-networks-gmbh/hp1820-cli 4216820 (May 5, 2025)