Allow root to log as postgres

This commit is contained in:
jeltz 2021-03-14 23:45:36 +01:00
parent 25e05069de
commit f15b222cdc
4 changed files with 16 additions and 6 deletions

View file

@ -1,6 +1,6 @@
---
- name: restart postgresql
- name: Reload postgresql
service:
name: postgresql
state: restarted
enabled: true
state: reloaded
...

View file

@ -35,9 +35,16 @@
group: postgres
loop:
- pg_hba.conf
- pg_ident.conf
- postgresql.conf
notify:
- restart postgresql
- Reload postgresql
- name: Enable and start PostgreSQL
systemd:
name: postgresql.service
state: started
enabled: true
- name: Create databases
become: true

View file

@ -9,8 +9,7 @@
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
local all postgres peer
local all postgres peer map=map_root
# "local" is for Unix domain socket connections only
local all all peer

View file

@ -0,0 +1,4 @@
{{ ansible_managed | comment }}
# MAPNAME SYSTEM-USERNAME PG-USERNAME
map_root root postgress