Fix SELinux context for PostgreSQL

This commit is contained in:
Sam A. 2024-01-07 19:24:04 +01:00
parent 6f0cf7d827
commit 4f55153783
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -41,14 +41,24 @@
ansible.builtin.file:
path: "{{ postgresql_pgdata }}"
owner: postgres
group: postgres
mode: u=rwx,go=
seuser: system_u
serole: object_r
setype: postgresql_db_t
selevel: s0
state: directory
- name: Create WAL archive directory
ansible.builtin.file:
path: "{{ postgresql_wal_archive }}"
owner: postgres
group: postgres
mode: u=rwx,go=
seuser: system_u
serole: object_r
setype: postgresql_db_t
selevel: s0
state: directory
- name: Initialize database