ops(ansible): harden provisioning and restore automation

Fail before host changes when required deployment variables are missing.

Precreate the PostgreSQL temporary directory and escape Bash syntax during Jinja rendering.
This commit is contained in:
cole-maxwell1
2026-08-07 09:58:15 -05:00
parent 74dff70b16
commit d118f52387
4 changed files with 37 additions and 0 deletions
@@ -17,7 +17,9 @@ systemctl stop "$POSTGRES_SERVICE"
shopt -s dotglob nullglob
contents=("$PGDATA"/*)
{% raw %}
if (( ${#contents[@]} > 0 )); then
{% endraw %}
rm -rf --one-file-system -- "${contents[@]}"
fi