Skip to content

Commit f97d70e

Browse files
committed
Feat: Add support for Postgres-07 and Ubuntu2004
Signed-off-by: Mahdi Fooladgar (professormahi) <professormahi_f@yahoo.com>
1 parent 8b7c947 commit f97d70e

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/postgres_hardening.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# - centosstream9
4242
# - rocky8
4343
# - rocky9
44-
- ubuntu1804
44+
# - ubuntu1804
4545
- ubuntu2004
4646
- ubuntu2204
4747
# - debian10

molecule/postgres_hardening/geerlingguy_postgresql_vars.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ postgresql_databases:
22
- name: example_db
33
postgresql_users:
44
- name: postgres
5-
password: iloverandompasswordsbutthiswilldo
5+
password: iloverandompasswordsbutthiswilldo
6+
postgresql_auth_method: scram-sha-256

roles/postgres_hardening/defaults/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ postgres_hardening_restart_postgres: true
1010
postgres_user: postgres
1111
postgres_group: postgres
1212

13+
# Password Authentication
14+
password_encryption: scram-sha-256
15+
1316
# SSL
1417
ssl_enabled: "on"
1518
ssl_ciphers: ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH

roles/postgres_hardening/tasks/hardening.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
mode: u=rw,g=r,o=
8989

9090
#################################
91-
# POSTGRES-11/12/16 #############
91+
# POSTGRES-07/11/12/16 ##########
9292
#################################
9393
- name: Secure postgresql.conf Configuration
9494
ansible.builtin.lineinfile:
@@ -97,6 +97,8 @@
9797
regexp: "{{ item.regexp }}"
9898
state: present
9999
with_items:
100+
- line: "password_encryption = {{ password_encryption }}"
101+
regexp: "#?password_encryption\\s?="
100102
- line: "ssl = {{ ssl_enabled }}"
101103
regexp: "#?ssl\\s?="
102104
- line: "ssl_ciphers = '{{ ssl_ciphers }}'"

0 commit comments

Comments
 (0)