From 1f1a3dfc3807a3cbc115904c15d6cd2235d1d97a Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Mon, 5 Dec 2022 14:42:02 +0200 Subject: [PATCH] Ensure database port is passed to Borg as an integer Without this, it's a string and borg says: > At 'hooks.postgresql_databases[INDEX_HERE].port': '5432' is not of type 'integer' > /etc/borgmatic/config.yaml /etc/borgmatic.d /tmp/.config/borgmatic/config.yaml /tmp/.config/borgmatic.d: No valid configuration files found .. and fails to do anything. --- roles/custom/matrix-backup-borg/templates/config.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/custom/matrix-backup-borg/templates/config.yaml.j2 b/roles/custom/matrix-backup-borg/templates/config.yaml.j2 index 210b7a65a..105c0ce1f 100644 --- a/roles/custom/matrix-backup-borg/templates/config.yaml.j2 +++ b/roles/custom/matrix-backup-borg/templates/config.yaml.j2 @@ -34,7 +34,7 @@ hooks: hostname: {{ matrix_backup_borg_postgresql_databases_hostname|to_json }} username: {{ matrix_backup_borg_postgresql_databases_username|to_json }} password: {{ matrix_backup_borg_postgresql_databases_password|to_json }} - port: {{ matrix_backup_borg_postgresql_databases_port|to_json }} + port: {{ matrix_backup_borg_postgresql_databases_port | int | to_json }} {% endfor %} {% endif %} after_backup: