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: ansible.builtin.file:
path: "{{ postgresql_pgdata }}" path: "{{ postgresql_pgdata }}"
owner: postgres owner: postgres
group: postgres
mode: u=rwx,go= mode: u=rwx,go=
seuser: system_u
serole: object_r
setype: postgresql_db_t
selevel: s0
state: directory state: directory
- name: Create WAL archive directory - name: Create WAL archive directory
ansible.builtin.file: ansible.builtin.file:
path: "{{ postgresql_wal_archive }}" path: "{{ postgresql_wal_archive }}"
owner: postgres owner: postgres
group: postgres
mode: u=rwx,go= mode: u=rwx,go=
seuser: system_u
serole: object_r
setype: postgresql_db_t
selevel: s0
state: directory state: directory
- name: Initialize database - name: Initialize database