Merge pull request 'Allow root to log as postgres' (#43) from bdd_local_root into master

Reviewed-on: Aurore/ansible#43
This commit is contained in:
jeltz 2021-03-14 23:55:49 +01:00
commit 45220cdebd
4 changed files with 16 additions and 6 deletions

View file

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

View file

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

View file

@ -9,8 +9,7 @@
# maintenance (custom daily cronjobs, replication, and similar tasks). # maintenance (custom daily cronjobs, replication, and similar tasks).
# #
# Database administrative login by Unix domain socket # 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" is for Unix domain socket connections only
local all all peer local all all peer

View file

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