reference-ansible/README.md
Simon Bärlocher c67e9aac43
chore(demo-gymburgdorf): finish ACME, LDAP, DMZ routing for live inventory
- ACME via DNS-01 against internal NS (172.16.9.169) with TCP-only +
  disableANSChecks so the DMZ traefik can issue LE certs without
  reaching public NS IPs.
- Migrate single-domain vars to `*_domains` lists (authentik, nextcloud,
  collabora, garage_s3) so public + *.int.* SANs share one cert and
  server-to-server traffic stays in the LAN.
- Wire `traefik_dmz_exposed_services` per backend host (application,
  storage) with explicit `backend_host` overrides pointing at internal
  FQDNs — DMZ traefik now validates upstream certs against SAN names.
- Nextcloud notify_push setup on internal FQDN to avoid DMZ hairpin;
  collabora WOPI / authentik LDAP outpost wired to *.int.* equivalents.
2026-05-27 23:18:58 +02:00

2.2 KiB

reference-ansible

Ansible-Setup für Demo-Deployments (demo-gymburgdorf, demo-mbazürich, demo-phbern) und lokale Vagrant-Tests. Rollen kommen aus der Collection digitalboard.core (via requirements.yml).

Architektur, Variablen-Hierarchie, Service-Topologie und der Walkthrough zum Aufsetzen neuer Mandanten: siehe ARCHITECTURE.md.

Voraussetzungen

  • ansible (Core ≥ 2.15)
  • bao CLI (OpenBao) — z. B. sudo pacman -S openbao python-hvac (Arch) oder Homebrew
  • python-hvac (für community.hashi_vault Lookups)

Setup

make install   # installiert digitalboard.core + community.hashi_vault nach ./collections/

Secrets (OpenBao)

Vor jedem Deploy in derselben Shell authentisieren:

export BAO_ADDR=https://bao.digitalboard.ch
bao login -method=oidc -path=Digitalboard
export VAULT_TOKEN=$(bao print token)

⚠️ make bao allein reicht nicht — jedes make-Target läuft in einer neuen Shell, der dort gesetzte VAULT_TOKEN lebt nur während make bao selbst. Entweder die drei Befehle oben manuell im Shell ausführen oder make bao deploy_site_demo_gymburgdorf als einen Aufruf chainen.

Deploy

make ping_demo                          # Smoke-Test gegen alle Demo-Inventories
make deploy_site_demo_gymburgdorf       # einzelnes Demo-Site
make deploy_site_demo                   # alle drei Demo-Sites

Auf macOS setzt das Makefile zusätzlich OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES — ohne diese Env-Var crashen Ansible-Forks beim ersten community.hashi_vault-Lookup.

Inventories

Inventory Zweck
inventories/demo-gymburgdorf/ Demo-Mandant — als Vorlage für neue Mandanten empfohlen, siehe ARCHITECTURE.md § 10
inventories/demo-mbazürich/ Demo-Mandant
inventories/demo-phbern/ Demo-Mandant
inventories/vagrant/ lokale Test-VMs; inkompatible Gruppen-Topologie zu den Demo-Inventories