diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-27 21:52:02 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-06-28 02:34:04 +0200 |
commit | d2f031ece106ed2dc37283b194edfa94718a6306 (patch) | |
tree | 42d4146e0f4b58ab724c4690c1ea431b3e733b7c /modules/role/templates/backup | |
parent | c53ac3f84852a42aa8b7341ee7fe0a629d2e3579 (diff) | |
download | Puppet-d2f031ece106ed2dc37283b194edfa94718a6306.tar.gz Puppet-d2f031ece106ed2dc37283b194edfa94718a6306.tar.zst Puppet-d2f031ece106ed2dc37283b194edfa94718a6306.zip |
Refactor backup postgresql
Diffstat (limited to 'modules/role/templates/backup')
3 files changed, 0 insertions, 56 deletions
diff --git a/modules/role/templates/backup/pam_ldap_pgbouncer.conf.erb b/modules/role/templates/backup/pam_ldap_pgbouncer.conf.erb deleted file mode 100644 index 384a418..0000000 --- a/modules/role/templates/backup/pam_ldap_pgbouncer.conf.erb +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | host <%= @ldap_server %> | ||
2 | |||
3 | base <%= @ldap_base %> | ||
4 | binddn <%= @ldap_dn %> | ||
5 | bindpw <%= @ldap_password %> | ||
6 | pam_login_attribute <%= @pgbouncer_ldap_attribute %> | ||
7 | pam_filter <%= @ldap_filter %> | ||
diff --git a/modules/role/templates/backup/pgbouncer.ini.erb b/modules/role/templates/backup/pgbouncer.ini.erb deleted file mode 100644 index 3ba8728..0000000 --- a/modules/role/templates/backup/pgbouncer.ini.erb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | [pgbouncer] | ||
2 | |||
3 | listen_addr = 0.0.0.0 | ||
4 | listen_port = 5432 | ||
5 | |||
6 | unix_socket_dir = /run/postgresql | ||
7 | unix_socket_mode = 0777 | ||
8 | |||
9 | auth_type = pam | ||
10 | |||
11 | admin_users = postgres | ||
12 | max_client_conn = 100 | ||
13 | default_pool_size = 20 | ||
14 | |||
15 | [databases] | ||
diff --git a/modules/role/templates/backup/postgresql_backup@.service.erb b/modules/role/templates/backup/postgresql_backup@.service.erb deleted file mode 100644 index 245a1cb..0000000 --- a/modules/role/templates/backup/postgresql_backup@.service.erb +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=PostgreSQL database server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | TimeoutSec=120 | ||
8 | User=postgres | ||
9 | Group=postgres | ||
10 | |||
11 | Environment=PGROOT=<%= @mountpoint %>/%i/postgresql | ||
12 | |||
13 | SyslogIdentifier=postgres | ||
14 | PIDFile=<%= @mountpoint %>/%i/postgresql/postmaster.pid | ||
15 | RuntimeDirectory=postgresql | ||
16 | RuntimeDirectoryMode=755 | ||
17 | |||
18 | ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT} | ||
19 | ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT} start -w -t 120 | ||
20 | ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT} reload | ||
21 | ExecStop= /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 | ||
25 | OOMScoreAdjust=-200 | ||
26 | |||
27 | # Additional security-related features | ||
28 | PrivateTmp=true | ||
29 | ProtectHome=true | ||
30 | ProtectSystem=full | ||
31 | NoNewPrivileges=true | ||
32 | |||
33 | [Install] | ||
34 | WantedBy=multi-user.target | ||