Merge pull request 'if master check added' (!2) from tpiccioli/ansible-role-postgresql:master into master

Reviewed-on: #2
This commit is contained in:
Andrea Dell'Amico 2021-09-17 23:28:47 +02:00
commit 3e01e4fa34
1 changed files with 7 additions and 0 deletions

View File

@ -1,5 +1,12 @@
#!/bin/bash
ISMASTER=`psql -t -c "SELECT pg_is_in_recovery();"`
if [ $ISMASTER != 'f' ]
then
echo "Not on master, nothing to do."
exit 0
fi
BASE_BACKUP_DIR={{ psql_base_backup_dir }}
WAL_ARCHIVES_LOG_DIR={{ psql_wal_archiving_log_dir }}
WAL_LATEST_BACKUP=