ansible-roles/postgresql/templates/pg_backup-default.j2

27 lines
813 B
Django/Jinja

PG_SERVICE=postgresql
PG_BACKUP_ENABLED={{ pg_backup_enabled }}
PG_VERSION={{ psql_version }}
PG_DUMP_BIN={{ pg_backup_pgdump_bin }}
PG_BCK_BIN={{ pg_backup_bin }}
{% if pg_backup_enabled %}
USE_NAGIOS={{ pg_backup_use_nagios }}
{% else %}
USE_NAGIOS=no
{% endif %}
LOG_DIR={{ pg_backup_logdir }}
LOG_FILE={{ pg_backup_logfile}}
N_DAYS_TO_SPARE={{ pg_backup_retain_copies }}
BUILD_DBLIST={{ pg_backup_build_db_list }}
{% if pg_backup_db_list is defined %}
DB_LIST="{{ pg_backup_db_list }}"
{% else %}
{% if psql_db_data is defined %}
DB_LIST="{% for db in psql_db_data %}{% if db.managedb is defined and db.managedb %}{{ db.name }} {% endif %}{% endfor %}"
{% else %}
DB_LIST=""
{% endif %}
{% endif %}
PG_USE_AUTH={{ pg_backup_use_auth }}
PG_PASS_FILE={{ pg_backup_pass_file }}
BACKUPDIR={{ pg_backup_destdir }}