From d2f031ece106ed2dc37283b194edfa94718a6306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 27 Jun 2018 21:52:02 +0200 Subject: Refactor backup postgresql --- .../templates/backup/pam_ldap_pgbouncer.conf.erb | 7 ----- modules/role/templates/backup/pgbouncer.ini.erb | 15 ---------- .../backup/postgresql_backup@.service.erb | 34 ---------------------- 3 files changed, 56 deletions(-) delete mode 100644 modules/role/templates/backup/pam_ldap_pgbouncer.conf.erb delete mode 100644 modules/role/templates/backup/pgbouncer.ini.erb delete mode 100644 modules/role/templates/backup/postgresql_backup@.service.erb (limited to 'modules/role/templates') 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 @@ -host <%= @ldap_server %> - -base <%= @ldap_base %> -binddn <%= @ldap_dn %> -bindpw <%= @ldap_password %> -pam_login_attribute <%= @pgbouncer_ldap_attribute %> -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 @@ -[pgbouncer] - -listen_addr = 0.0.0.0 -listen_port = 5432 - -unix_socket_dir = /run/postgresql -unix_socket_mode = 0777 - -auth_type = pam - -admin_users = postgres -max_client_conn = 100 -default_pool_size = 20 - -[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 @@ -[Unit] -Description=PostgreSQL database server -After=network.target - -[Service] -Type=forking -TimeoutSec=120 -User=postgres -Group=postgres - -Environment=PGROOT=<%= @mountpoint %>/%i/postgresql - -SyslogIdentifier=postgres -PIDFile=<%= @mountpoint %>/%i/postgresql/postmaster.pid -RuntimeDirectory=postgresql -RuntimeDirectoryMode=755 - -ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT} -ExecStart= /usr/bin/pg_ctl -s -D ${PGROOT} start -w -t 120 -ExecReload=/usr/bin/pg_ctl -s -D ${PGROOT} reload -ExecStop= /usr/bin/pg_ctl -s -D ${PGROOT} stop -m fast - -# Due to PostgreSQL's use of shared memory, OOM killer is often overzealous in -# killing Postgres, so adjust it downward -OOMScoreAdjust=-200 - -# Additional security-related features -PrivateTmp=true -ProtectHome=true -ProtectSystem=full -NoNewPrivileges=true - -[Install] -WantedBy=multi-user.target -- cgit v1.2.3