mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
svc-net-tor aborts at roles/svc-net-tor/tasks/router.yml:2 when networks.internet.dns is empty, and rightly so: dnsmasq runs with no-resolv, so an empty upstream leaves the node answering .onion and nothing else. That value is set in exactly two places, both under inventories/development/, and the documented production path reaches neither - the provisioner writes no networks key at all. A reader following the role README verbatim therefore cannot deploy a Tor node. CI has been proving this since 2026-08-31 without anyone seeing it: the README replay rides on the role's smallest variant and is skipped when the deploy is red, so the only row that ever reached it is one where svc-net-tor itself went green. That happened first on Ubuntu, where the local-service defectabb6f37297fixes never fired. The template now emits the DNS assignment, the -e passthrough and the networks entry in --vars for a role whose tasks name networks.internet.dns, which today is svc-net-tor alone; the generator derives that rather than taking a declaration, so a second role asking for the value documents it by doing so. scripts/github/guide/compose_deploy.sh substitutes the placeholder from INFINITO_DNS_IP, the same SPOT inventories/development/default.yml reads, next to the existing domain substitution. This follows972596a758, which added the administrator key to the same block for the same reason. No fallback inside the role: defaulting to NETWORK_PUBLIC_DNS_RESOLVERS would route a Tor node's clearnet queries to Cloudflare without the operator choosing it, which is what the assert exists to prevent. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
21 lines
974 B
Bash
Executable File
21 lines
974 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Extract the role README's "### Production" bash block and replay it against
|
|
# the running compose server, exactly as the guide instructs a human to.
|
|
# Env: GUIDE_ROLE; INFINITO_CONTAINER comes from scripts/meta/env/load.sh.
|
|
set -euo pipefail
|
|
|
|
: "${GUIDE_ROLE:?}"
|
|
|
|
awk '/^### Production$/{p=1} p && /^```bash$/{c=1; next} c && /^```$/{exit} c' \
|
|
"roles/${GUIDE_ROLE}/README.md" >/tmp/deploy.sh
|
|
sed -n '1,/docker run/p' /tmp/deploy.sh | grep -E '^[A-Z_]+=' |
|
|
sed 's#^HOST=.*#HOST=localhost#' >/tmp/run.sh
|
|
perl -0777 -ne "print \$1 if /bash -c '(.*)'/s" /tmp/deploy.sh >>/tmp/run.sh
|
|
test -s /tmp/run.sh
|
|
# shellcheck source=/dev/null
|
|
source scripts/meta/env/load.sh
|
|
sed -i "s#<your-ssh-public-key>#ssh-ed25519 AAAA_TEST_DUMMY_KEY github-ci-dummy@infinito#" /tmp/run.sh
|
|
sed -i "s#<your-domain>#${INFINITO_DOMAIN}#" /tmp/run.sh
|
|
sed -i "s#<your-clearnet-resolver>#${INFINITO_DNS_IP}#" /tmp/run.sh
|
|
docker exec -i "${INFINITO_CONTAINER}" bash -s </tmp/run.sh
|