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
1 changed files with 10 additions and 0 deletions

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