Allow root to log as postgres
This commit is contained in:
parent
25e05069de
commit
f15b222cdc
4 changed files with 16 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: restart postgresql
|
||||
- name: Reload postgresql
|
||||
service:
|
||||
name: postgresql
|
||||
state: restarted
|
||||
enabled: true
|
||||
state: reloaded
|
||||
...
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
# MAPNAME SYSTEM-USERNAME PG-USERNAME
|
||||
map_root root postgress
|
Loading…
Reference in a new issue