Skip to content

Commit

Permalink
Readd support for secure PostgreSQL password hashes (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
krauthosting committed Nov 18, 2023
1 parent 4398282 commit 129ce1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions roles/zabbix_proxy/tasks/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
community.postgresql.postgresql_user:
db: "{{ zabbix_proxy_dbname }}"
name: "{{ zabbix_proxy_dbuser }}"
password: "md5{{ (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5') }}"
password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}"
port: "{{ zabbix_proxy_dbport }}"
priv: ALL
state: present
Expand Down Expand Up @@ -61,7 +61,7 @@
login_password: "{{ zabbix_proxy_pgsql_login_password | default(omit) }}"
db: "{{ zabbix_proxy_dbname }}"
name: "{{ zabbix_proxy_dbuser }}"
password: "md5{{ (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5') }}"
password: "{{ ('md5' + (zabbix_proxy_dbpassword + zabbix_proxy_dbuser)|hash('md5')) if zabbix_proxy_dbpassword_hash_method == 'md5' else zabbix_proxy_dbpassword }}"
port: "{{ zabbix_proxy_dbport }}"
priv: ALL
state: present
Expand Down
4 changes: 2 additions & 2 deletions roles/zabbix_server/tasks/postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
community.postgresql.postgresql_user:
db: "{{ zabbix_server_dbname }}"
name: "{{ zabbix_server_dbuser }}"
password: "md5{{ (zabbix_server_dbpassword + zabbix_server_dbuser)|hash('md5') }}"
password: "{{ ('md5' + (zabbix_server_dbpassword + zabbix_server_dbuser)|hash('md5')) if zabbix_server_dbpassword_hash_method == 'md5' else zabbix_server_dbpassword }}"
port: "{{ zabbix_server_dbport }}"
priv: ALL
state: present
Expand Down Expand Up @@ -68,7 +68,7 @@
login_password: "{{ zabbix_server_pgsql_login_password | default(omit) }}"
db: "{{ zabbix_server_dbname }}"
name: "{{ zabbix_server_dbuser }}"
password: "md5{{ (zabbix_server_dbpassword + zabbix_server_dbuser)|hash('md5') }}"
password: "{{ ('md5' + (zabbix_server_dbpassword + zabbix_server_dbuser)|hash('md5')) if zabbix_server_dbpassword_hash_method == 'md5' else zabbix_server_dbpassword }}"
port: "{{ zabbix_server_dbport }}"
priv: ALL
state: present
Expand Down

0 comments on commit 129ce1c

Please sign in to comment.