tenseleyflow/shithub / 75e8b4e

Browse files

ansible(pg): install conf.d archive override at the live config path

Authored by espadonne
SHA
75e8b4e1bb77269b3996696dfb18252fad7aaa71
Parents
d034668
Tree
4e19474

1 changed file

StatusFile+-
M deploy/ansible/roles/postgres/tasks/main.yml 24 0
deploy/ansible/roles/postgres/tasks/main.ymlmodified
@@ -61,6 +61,30 @@
6161
     owner: root
6262
     group: root
6363
 
64
+# Drop-in conf.d include for archiving. The earlier `postgresql.conf —
65
+# render` task above writes to /data/pgdata/postgresql.conf, but
66
+# pg_ctlcluster (Debian's wrapper) ignores PGDATA= and uses
67
+# /etc/postgresql/16/main/postgresql.conf as the live config — so the
68
+# templated /data file is currently ignored at runtime. Until the
69
+# data-dir-on-block-volume migration is sorted, the supported way to
70
+# override settings on Debian is a conf.d drop-in.
71
+- name: postgres conf.d — ensure dir
72
+  file:
73
+    path: /etc/postgresql/16/main/conf.d
74
+    state: directory
75
+    owner: postgres
76
+    group: postgres
77
+    mode: "0755"
78
+
79
+- name: postgres conf.d — install shithub archive overrides
80
+  template:
81
+    src: 99_shithub_archive.conf
82
+    dest: /etc/postgresql/16/main/conf.d/99_shithub_archive.conf
83
+    owner: postgres
84
+    group: postgres
85
+    mode: "0644"
86
+  notify: restart postgres
87
+
6488
 - name: systemd unit override — ensure drop-in dir exists
6589
   file:
6690
     path: /etc/systemd/system/postgresql@16-main.service.d