ansible(pg): install conf.d archive override at the live config path
- SHA
75e8b4e1bb77269b3996696dfb18252fad7aaa71- Parents
-
d034668 - Tree
4e19474
75e8b4e
75e8b4e1bb77269b3996696dfb18252fad7aaa71d034668
4e19474| Status | File | + | - |
|---|---|---|---|
| M |
deploy/ansible/roles/postgres/tasks/main.yml
|
24 | 0 |
deploy/ansible/roles/postgres/tasks/main.ymlmodified@@ -61,6 +61,30 @@ | ||
| 61 | 61 | owner: root |
| 62 | 62 | group: root |
| 63 | 63 | |
| 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 | + | |
| 64 | 88 | - name: systemd unit override — ensure drop-in dir exists |
| 65 | 89 | file: |
| 66 | 90 | path: /etc/systemd/system/postgresql@16-main.service.d |