aboutsummaryrefslogtreecommitdiff
path: root/modules/profile/templates/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profile/templates/postgresql')
-rw-r--r--modules/profile/templates/postgresql/pam_ldap_pgbouncer.conf.erb7
-rw-r--r--modules/profile/templates/postgresql/pam_ldap_postgresql.conf.erb6
-rw-r--r--modules/profile/templates/postgresql/postgresql_backup@.service.erb34
3 files changed, 47 insertions, 0 deletions
diff --git a/modules/profile/templates/postgresql/pam_ldap_pgbouncer.conf.erb b/modules/profile/templates/postgresql/pam_ldap_pgbouncer.conf.erb
new file mode 100644
index 0000000..12fa9bb
--- /dev/null
+++ b/modules/profile/templates/postgresql/pam_ldap_pgbouncer.conf.erb
@@ -0,0 +1,7 @@
1host <%= @ldap_server %>
2
3base <%= @ldap_base %>
4binddn <%= @ldap_dn %>
5bindpw <%= @ldap_password %>
6pam_login_attribute <%= @ldap_attribute %>
7pam_filter <%= @ldap_filter %>
diff --git a/modules/profile/templates/postgresql/pam_ldap_postgresql.conf.erb b/modules/profile/templates/postgresql/pam_ldap_postgresql.conf.erb
new file mode 100644
index 0000000..f3d9674
--- /dev/null
+++ b/modules/profile/templates/postgresql/pam_ldap_postgresql.conf.erb
@@ -0,0 +1,6 @@
1host <%= @ldap_server %>
2
3base <%= @ldap_base %>
4binddn <%= @ldap_dn %>
5bindpw <%= @ldap_password %>
6pam_login_attribute <%= @ldap_attribute %>
diff --git a/modules/profile/templates/postgresql/postgresql_backup@.service.erb b/modules/profile/templates/postgresql/postgresql_backup@.service.erb
new file mode 100644
index 0000000..74f5a98
--- /dev/null
+++ b/modules/profile/templates/postgresql/postgresql_backup@.service.erb
@@ -0,0 +1,34 @@
1[Unit]
2Description=PostgreSQL database server
3After=network.target
4
5[Service]
6Type=forking
7TimeoutSec=120
8User=postgres
9Group=postgres
10
11Environment=PGROOT=<%= @base_path %>/%i/postgresql
12
13SyslogIdentifier=postgres
14PIDFile=<%= @base_path %>/%i/postgresql/postmaster.pid
15RuntimeDirectory=postgresql
16RuntimeDirectoryMode=755
17
18ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}
19ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT} start -w -t 120
20ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT} reload
21ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT} stop -m fast
22
23# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in
24# killing Postgres, so adjust it downward
25OOMScoreAdjust=-200
26
27# Additional security-related features
28PrivateTmp=true
29ProtectHome=true
30ProtectSystem=full
31NoNewPrivileges=true
32
33[Install]
34WantedBy=multi-user.target