tenseleyflow/shithub / ef7f7ab

Browse files

ansible(pg): install verifier + hourly cron

Authored by espadonne
SHA
ef7f7ab8ea9807f77376aeaa52228dc4d0e462b1
Parents
b1e940d
Tree
b584672

1 changed file

StatusFile+-
M deploy/ansible/roles/postgres/tasks/main.yml 18 0
deploy/ansible/roles/postgres/tasks/main.ymlmodified
@@ -85,6 +85,24 @@
8585
     mode: "0644"
8686
   notify: restart postgres
8787
 
88
+- name: WAL archive — install verifier
89
+  copy:
90
+    src: "{{ playbook_dir }}/../postgres/verify-wal-archive.sh"
91
+    dest: /usr/local/bin/shithub-verify-wal-archive
92
+    mode: "0755"
93
+    owner: root
94
+    group: root
95
+
96
+# Hourly health check. Silent on success; loud on the journal under
97
+# `journalctl -t shithub-wal-archive` if archiving has stopped, the
98
+# failed_count climbed, or segments aren't landing in Spaces. Same
99
+# observability shape as the AIDE check.
100
+- name: cron — hourly WAL-archive verifier
101
+  cron:
102
+    name: shithub-verify-wal-archive
103
+    job: /usr/local/bin/shithub-verify-wal-archive
104
+    minute: "47"
105
+
88106
 - name: systemd unit override — ensure drop-in dir exists
89107
   file:
90108
     path: /etc/systemd/system/postgresql@16-main.service.d