Skip to content

Commit

Permalink
Feat: Add Postgres-20
Browse files Browse the repository at this point in the history
Signed-off-by: Mahdi Fooladgar (professormahi) <[email protected]>
  • Loading branch information
professormahi committed Dec 6, 2023
1 parent 0226a4b commit fcfe9c6
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions roles/postgres_hardening/tasks/hardening.yml
Expand Up @@ -106,10 +106,10 @@
state: present
with_items:
- line: "ssl = {{ ssl_enabled }}"
regexp: "#?ssl\\s?="
regexp: "#?ssl\\s?="
- line: "ssl_ciphers = '{{ ssl_ciphers }}'"
regexp: "#?ssl_ciphers\\s?="
- line : "logging_collector = {{ logging_collector }}"
- line: "logging_collector = {{ logging_collector }}"
regexp: "#?logging_collector\\s?="
- line: "log_connections = {{ log_connections }}"
regexp: "#?log_connections\\s?="
Expand All @@ -123,4 +123,23 @@
regexp: "#?log_directory\\s?="
- line: "log_line_prefix = '{{ log_line_prefix }}'"
regexp: "#?log_line_prefix\\s?="
notify: Restart postgres
notify: Restart postgres

#################################
# POSTGRES-20 ###################
#################################
- name: Manage permissions on /var/lib/postgresql/<version>/main
ansible.builtin.file:
path: "/var/lib/postgresql/{{ postgres_version }}/main"
state: directory
owner: "{{ postgres_user }}"
group: "{{ postgres_group }}"
mode: u=rwx,g=,o=

- name: Manage permissions on /var/log/postgresql
ansible.builtin.file:
path: /var/log/postgresql
state: directory
owner: "{{ postgres_user }}"
group: "{{ postgres_group }}"
mode: u=rwx,g=,o=

0 comments on commit fcfe9c6

Please sign in to comment.