Skip to content

Commit fcfe9c6

Browse files
committed
Feat: Add Postgres-20
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
1 parent 0226a4b commit fcfe9c6

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

Diff for: roles/postgres_hardening/tasks/hardening.yml

+22-3
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@
106106
state: present
107107
with_items:
108108
- line: "ssl = {{ ssl_enabled }}"
109-
regexp: "#?ssl\\s?="
109+
regexp: "#?ssl\\s?="
110110
- line: "ssl_ciphers = '{{ ssl_ciphers }}'"
111111
regexp: "#?ssl_ciphers\\s?="
112-
- line : "logging_collector = {{ logging_collector }}"
112+
- line: "logging_collector = {{ logging_collector }}"
113113
regexp: "#?logging_collector\\s?="
114114
- line: "log_connections = {{ log_connections }}"
115115
regexp: "#?log_connections\\s?="
@@ -123,4 +123,23 @@
123123
regexp: "#?log_directory\\s?="
124124
- line: "log_line_prefix = '{{ log_line_prefix }}'"
125125
regexp: "#?log_line_prefix\\s?="
126-
notify: Restart postgres
126+
notify: Restart postgres
127+
128+
#################################
129+
# POSTGRES-20 ###################
130+
#################################
131+
- name: Manage permissions on /var/lib/postgresql/<version>/main
132+
ansible.builtin.file:
133+
path: "/var/lib/postgresql/{{ postgres_version }}/main"
134+
state: directory
135+
owner: "{{ postgres_user }}"
136+
group: "{{ postgres_group }}"
137+
mode: u=rwx,g=,o=
138+
139+
- name: Manage permissions on /var/log/postgresql
140+
ansible.builtin.file:
141+
path: /var/log/postgresql
142+
state: directory
143+
owner: "{{ postgres_user }}"
144+
group: "{{ postgres_group }}"
145+
mode: u=rwx,g=,o=

0 commit comments

Comments
 (0)