library/roles/postgresql/templates/pg_backup-default.j2: Fix the list of DBs to be backupped.

This commit is contained in:
Andrea Dell'Amico 2016-11-30 18:40:39 +01:00
parent 141679f97e
commit c4ef41b069
1 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,11 @@ BUILD_DBLIST={{ pg_backup_build_db_list }}
{% if pg_backup_db_list is defined %}
DB_LIST="{{ pg_backup_db_list }}"
{% else %}
DB_LIST="{% for db in psql_db_data %}{{ db.name }} {% endfor %}"
{% 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 }}