Skip to content

Instantly share code, notes, and snippets.

View gisaba's full-sized avatar

Giovanni Salvatore Barbato gisaba

  • INPS
View GitHub Profile
@gisaba
gisaba / cluster_params.yaml
Created May 3, 2021 16:16
ansible-playbook-cluster-postgres10-repmgr
repplication_user: repmgr
replication_db: repmgr
primary_host: 192.168.1.181
mount_point_tbs : /pgsql_tsds/pgsql
wal_level_value : replica
network_segment: 192.168.0.0
packages:
- name: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
required: True
- name: postgresql10-server
# script per la creazione di un nuovo database
if [ -n "$1" ] && [ $# -eq 2 ]
then
psql -c "create database $1;"
psql -c "create user $1_web;"
psql -c "create user $1_owner;"
PWD_WEB="$(openssl rand -base64 14)"