diff options
| author | Colin Wilk <colin@wilk.cx> | 2026-06-27 23:01:10 +0200 |
|---|---|---|
| committer | Colin Wilk <colin@wilk.cx> | 2026-06-27 23:05:21 +0200 |
| commit | 8d872069976c5445c4396804ef3a0196f10eb14b (patch) | |
| tree | 53ba2a34baf356fa9711e9be472d2d5322f1010e /tasks/client_create_scripts_each.yml | |
| parent | cce7d2d258292c283d64ce8da14a6d1e366b564d (diff) | |
| download | ansible-role-borgbackup-8d872069976c5445c4396804ef3a0196f10eb14b.tar.gz ansible-role-borgbackup-8d872069976c5445c4396804ef3a0196f10eb14b.zip | |
feat: add per-repo SSH key support
Add borg_ssh_key_per_repo option to generate unique SSH keypairs per
(server, repo) combination. When enabled, each repository gets its own
authorized_keys entry, enabling:
- Independent --append-only settings per repository
- Per-repo storage quotas
Diffstat (limited to 'tasks/client_create_scripts_each.yml')
| -rw-r--r-- | tasks/client_create_scripts_each.yml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tasks/client_create_scripts_each.yml b/tasks/client_create_scripts_each.yml index 6c0615f..a9c5c31 100644 --- a/tasks/client_create_scripts_each.yml +++ b/tasks/client_create_scripts_each.yml @@ -24,6 +24,9 @@ marker: "## {mark} ANSIBLE MANAGED BLOCK for {{ borg_server_host_url }}/{{ borg_repo_name }}" block: | export BORG_PASSPHRASE={{ borg_passphrase | quote }} + {% if borg_ssh_key_per_repo %} + export BORG_RSH="ssh -i {{ borg_ssh_key_path }}" + {% endif %} borg create -C {{ borg_compression }} \ borg@{{ borg_server_host_url }}:{{ borg_server_user_home }}/{{ borg_repo_name }}::{{ borg_backup_name_format }} \ {{ borg_included_dirs | map('quote') | join(' ') }} \ |