From a2d9b553f0a2c34c46e8970956b95b73c80881bb Mon Sep 17 00:00:00 2001 From: Julien BELIARD Date: Wed, 15 May 2024 16:08:30 +0200 Subject: [PATCH] Added a customisation of barman templates The objective is to be able to add new parameters (ie: streaming_wals_directory) --- roles/setup_barman/defaults/main.yml | 1 + roles/setup_barman/templates/barman.postgres.template | 1 + roles/setup_barman/templates/barman.rsync.template | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/setup_barman/defaults/main.yml b/roles/setup_barman/defaults/main.yml index 97f3bca6..4785347d 100644 --- a/roles/setup_barman/defaults/main.yml +++ b/roles/setup_barman/defaults/main.yml @@ -8,6 +8,7 @@ use_patroni: false barman_user: "barman" barman_home: "/var/lib/barman" barman_pg_user: "barman" +barman_template_lines: [] etc_hosts_lists: [] update_etc_file: true # SSH listening port diff --git a/roles/setup_barman/templates/barman.postgres.template b/roles/setup_barman/templates/barman.postgres.template index b20161ae..3f99af1d 100644 --- a/roles/setup_barman/templates/barman.postgres.template +++ b/roles/setup_barman/templates/barman.postgres.template @@ -10,3 +10,4 @@ backup_options = concurrent_backup immediate_checkpoint = true recovery_options = get-wal create_slot = auto +{% for line in barman_template_lines %}{{ line }}{% endfor %} diff --git a/roles/setup_barman/templates/barman.rsync.template b/roles/setup_barman/templates/barman.rsync.template index 9f81f8b3..1de20940 100644 --- a/roles/setup_barman/templates/barman.rsync.template +++ b/roles/setup_barman/templates/barman.rsync.template @@ -10,3 +10,4 @@ archiver = on backup_options = concurrent_backup immediate_checkpoint = true recovery_options = get-wal +{% for line in barman_template_lines %}{{ line }}{% endfor %}