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
+8
View File
@@ -1,4 +1,12 @@
---
- name: Create PostgreSQL Ansible temporary directory
ansible.builtin.file:
path: /var/lib/pgsql/.ansible/tmp
state: directory
owner: postgres
group: postgres
mode: "0700"
- name: Initialize PostgreSQL data directory
ansible.builtin.command:
argv: [postgresql-setup, --initdb]