Redo backup_borg_location_exclude_patterns to ensure it doesn't contain empty strings

Previously, if Postgres or MariaDB were disabled, an empty path (`''`) would be injected. I'm not sure how borg-backup would handle such paths, but I suppose we'd better not feed it such stuff.
This commit is contained in:
Slavi Pantaleev 2023-05-02 09:16:53 +03:00 committed by GitHub
parent ab05b6df3f
commit c645f2ae8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -630,14 +630,15 @@ backup_borg_mysql_databases_password: "{{ mariadb_root_passsword if mariadb_enab
backup_borg_mysql_databases_port: "{{ devture_postgres_connection_port if mariadb_enabled else 3306 }}"
backup_borg_mysql_databases: "{{ mariadb_managed_databases | map(attribute='name') if mariadb_enabled else [] }}"
backup_borg_location_source_directories:
- "{{ mash_playbook_base_path }}"
backup_borg_location_exclude_patterns:
- "{{ devture_postgres_data_path if devture_postgres_enabled else '' }}"
- "{{ mariadb_data_path if mariadb_enabled else '' }}"
backup_borg_location_exclude_patterns: |
{{
([devture_postgres_data_path] if devture_postgres_enabled else [])
+
([mariadb_data_path] if mariadb_enabled else [])
}}
backup_borg_systemd_required_services_list: |
{{