Saving:
- config.json, presets.json, the imported copies and the inventory's
vars.yml and hosts are written by config.WriteSecret: to a temp file
that's synced and renamed into place, so a crash or full disk leaves
the old file instead of half of the new one, and always 0600. Writing
in place kept the mode of a file that was already 0644, as a hand-made
inventory or a restored backup often is. Links are followed, so a
linked inventory stays linked.
- A config.json that isn't valid JSON is moved aside to
config.json.broken-<time> before the wizard starts afresh. Before,
the fresh answers' new secrets overwrote it on the next save, and a
redeploy locked Synapse out of Postgres.
- Importing over a server whose answers can't be read now stops instead
of replacing them without a .before-import copy.
- The imported vars file is kept as imported/<name>/vars.yml, which is
where ImportedVars reads it, whatever it was called.
The base domain:
- It has to be a hostname. It becomes directory names in the
inventory, so 'https://example.org' made nested directories, and an
imported matrix_domain of '../../tmp/x' wrote outside the playbook.
The Server step drops a pasted https:// and trailing slash; Missing()
and the importer refuse anything else.
vars.yml:
- A one-line Fine-tune value that is a block list or mapping ("- a",
"a: b") is written under the key rather than after it, which wasn't
YAML.
- A pasted "|" block in a YAML field is indented like an override's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>