roles/postgresql-server: Deploy PostgreSQL
The *postgresql-server* role installs and configures PostgreSQL on Fedora/RHEL-based distributions.
This commit is contained in:
7
roles/postgresql-server/templates/pg_hba.conf.j2
Normal file
7
roles/postgresql-server/templates/pg_hba.conf.j2
Normal file
@@ -0,0 +1,7 @@
|
||||
{#- vim: set ft=jinja : -#}
|
||||
# TYPE DATABASE USER ADDRESS METHOD
|
||||
{% for auth in pg_hba_extra|d({}) %}
|
||||
{{ '{type: <9} {database: <15} {user: <15} {address: <23} {method}'.format(**auth) }}
|
||||
{% endfor %}
|
||||
local all postgres peer
|
||||
local sameuser all peer
|
||||
3
roles/postgresql-server/templates/pg_ident.conf.j2
Normal file
3
roles/postgresql-server/templates/pg_ident.conf.j2
Normal file
@@ -0,0 +1,3 @@
|
||||
{% for item in pg_ident %}
|
||||
{{ item.mapname }} {{ item.system_user }} {{ item.pg_user }}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Before=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
Environment=PGDATA={{ pgdata_dir }}
|
||||
Environment=LANG={{ pg_locale }}
|
||||
User=postgres
|
||||
Group=postgres
|
||||
ExecStart=/bin/sh -c "[ -f ${PGDATA}/PG_VERSION ] || initdb -D ${PGDATA}"
|
||||
Reference in New Issue
Block a user