No description
  • Shell 86.5%
  • Jinja 6.2%
  • Python 5%
  • JavaScript 2.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-25 10:29:29 +01:00
.forgejo/workflows Update renovate/renovate to v44.241.0 2026-11-23 06:08:28 +00:00
.vibe
agents/skills/iac-app-creation
ansible Merge pull request 'Report a ruleset that nft did not print as unknown' (#71) from firewall-unreadable-unknown into main 2026-11-25 10:29:24 +01:00
apt
bin
ci
docs runner cleanup: detect a running build by its locks instead of pgrep -f 2026-11-25 09:39:40 +01:00
entry
image
lib adopt: Remove APT sources of the old installation and report orphaned packages 2026-11-23 11:59:36 +01:00
packages
renovate Hold Qdrant at 1.20.0 in Renovate 2026-11-20 09:04:14 +01:00
schema Allow ports with access "docker" that only document 2026-11-22 12:28:10 +01:00
templates/app
tools Merge pull request 'Lint shell scripts under files/ by their shebang' (#70) from lint-scripts-under-files into main 2026-11-25 10:29:29 +01:00
.clinerules
.cursorrules
.windsurfrules
AGENTS.md Start app images from a daily base image instead of debootstrap 2026-11-17 22:43:26 +01:00
CLAUDE.md
GEMINI.md
LICENSE
modules.json Add the module clamav for the virus scan of uploads 2026-11-24 18:04:27 +01:00
os.json
README.md Add the module clamav for the virus scan of uploads 2026-11-24 18:04:27 +01:00

iac-core

Gemeinsame Basis aller iac-*-Apps: Proxmox-VE-Einzeiler für LXC und VM auf Debian 13, VM-Images mit bootstrap-vz, update im Gast. Den Sollzustand jedes Gasts stellt Ansible her (ansible/site.yml, läuft lokal im Gast); jede App ist eine Ansible-Rolle.

Aufbau

Pfad Inhalt
ansible/site.yml der Sollzustand: iac_facts → iac_baseline → iac_modules → App → iac_finish
ansible/roles/iac_* Rollen von iac-core: Fakten (iac.json, Instanz, Secrets), Baseline, Module, Abschluss (Firewall, Dienste, Health, instance.json), Hilfsrollen iac_service, iac_version, iac_tls und iac_apt_source
ansible/roles/<modul> Module: postgresql, mariadb, mail-relay, valkey, clamav, elasticsearch, backup, disk-space, crowdsec, fail2ban, node-exporter, unattended-upgrades, auto-update, desktop, aliases (Übersicht)
modules.json Modul-Katalog: Titel, Beschreibung, Plattformen – jedes Modul ist für jede App wählbar (update --add-modules)
os.json Betriebssysteme der Gäste ("os" in iac.json, Standard debian; haos = Home Assistant OS als VM): Plattformen, Herkunft des Images und was iac dort kann
lib/core.func Ausgabe, Downloads, Checksummen – Host und Gast
lib/host.func Proxmox-Host: Dialoge, pct create, qm create, Image-Download
lib/guest.func Gast: Sperre, Debian-Quellen, Ansible starten, Update, Adopt, Release-Upgrade
lib/smoke.func check "…" '…' für die Smoke-Tests der Apps und Module
bin/iac-install Sollzustand herstellen (LXC, Image-Build, erster Boot einer VM, update, Adopt)
bin/iac-update wird von /usr/bin/update im Gast aufgerufen
bin/iac-adopt bestehende Installation übernehmen (gestartet von /<app>/adopt.sh)
bin/iac-smoke Selbsttest im Gast (Boot-Test und von Hand)
bin/iac-tls Zertifikat des Gasts: Schlüssel und CSR erzeugen, Zertifikat einer CA einspielen (im Gast /usr/local/sbin/iac-tls)
entry/ Einstiegsskripte ct.sh, vm.sh, adopt.sh – die Website liefert sie für jede App aus (/<app>/ct.sh), die Apps haben keine eigenen
ci/ Composite Actions ci/lint und ci/image – die Schritte der Workflows aller Apps
templates/app/ Vorlage für neue App-Repos (tools/new-app.sh), die kurzen Workflows für alle Apps
packages/ Paketlisten von iac-core: base (alle), lxc, vm
apt/ die einzigen Fremd-Repositories: <name>.sources mit gepinntem Schlüssel <name>.asc (Zammad, Elastic, Docker CE, Jellyfin) – Rolle iac_apt_source
image/base.yml bootstrap-vz-Basismanifest
tools/ Build, Boot-Test, Veröffentlichen, Lint (CI), new-app.sh, dev-container.sh, upstream-version.sh, runner/
schema/iac.schema.json Format der iac.json einer App

Neue App

cd ~/repositories/iac
iac-core/tools/new-app.sh <name>             # legt iac-<name>/ an (überschreibt nie etwas)
iac-core/tools/lint.sh iac-<name>            # braucht shellcheck, jq und ansible-core
iac-core/tools/dev-container.sh iac-<name>   # ohne Proxmox ausprobieren (Docker mit systemd)

Anleitung: https://iac.heyer.systems/docs/eigene-app/ – Beispiel zum Lesen: iac-example.

Im Gast:

bash /var/lib/iac/src/core/bin/iac-install        # Sollzustand erneut herstellen
IAC_VERBOSE=1 bash /var/lib/iac/src/core/bin/iac-install   # mit allen Task-Ergebnissen
bash /var/lib/iac/src/core/bin/iac-smoke          # dasselbe wie der Boot-Test

Versionen

Apps laden iac-core über einen mitlaufenden Tag. Kompatible Änderungen werden durch Verschieben des Tags ausgerollt:

git tag -f v2 && git push -f origin v2
Tag Stand
v2 Ansible: die App ist eine Rolle (tasks/main.yml, handlers/, templates/, files/)
v1 Bash-Hooks (app.func, packages.list, rootfs/). Eingefroren. Ein update in einem v1-Gast wechselt von selbst auf v2, sobald die App umgestellt ist

Inkompatible Änderungen bekommen einen neuen Tag. Der Tag steht in entry/*.sh (IAC_CORE_REF) und in den Workflows der Apps (uses: …/ci/lint@v2).

Zum Testen eines Branches: IAC_CORE_REF=<branch> bash -c "$(curl …/ct.sh)".