Skip to content

Commit c492227

Browse files
committed
fix: Remove extraneous postgresql config files
This change adds a task to remove `pg_hba.conf`, `pg_ident.conf`, and `postgresql.conf` from the PostgreSQL data directory. This ensures there is no confusion about what configuration file is active.
1 parent d4e5d33 commit c492227

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ansible/tasks/setup-postgres.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,17 @@
322322
when:
323323
- (is_psql_oriole or is_psql_17)
324324

325+
- name: Remove extraneous configuration files
326+
ansible.builtin.file:
327+
path: /var/lib/postgresql/data/{{ conf_item }}
328+
state: absent
329+
loop:
330+
- pg_hba.conf
331+
- pg_ident.conf
332+
- postgresql.conf
333+
loop_control:
334+
loop_var: conf_item
335+
325336
- name: copy PG and optimizations systemd units
326337
ansible.builtin.template:
327338
dest: "/etc/systemd/system/{{ systemd_svc_item | basename }}"

0 commit comments

Comments
 (0)