yurihs.borg_server
Ansible Role: Borg Server
- Installs BorgBackup.
- Sets up SSH
authorized_keys
for clients to use their repositories (and nothing else).
This is designed to work with my other role, yurihs.borg_client.
Role Variables (default values)
borg_server_user: borg
borg_server_group: borg
Specifies who can access the keys and repositories.
borg_server_dir: /srv/borg
The location where the repositories will be stored.
borg_server_clients: []
A list of clients allowed to connect. Each client should have a name
and a key
, with an optional append_only
set to true
to limit it to "append only" mode (if borg_server_append_only
is true
, setting this to false
won’t change anything).
borg_server_append_only: false
Limits all clients to "append only" mode.
Example
- hosts: backup
vars:
borg_server_clients:
- name: client_a
key: "{{ lookup('file', playbook_dir + '/keys/id_client_a.pub') }}"
- name: client_b
key: "{{ lookup('file', playbook_dir + '/keys/id_client_b.pub') }}"
append_only: true
roles:
- role: yurihs.borg_server
become: true
"Client A" can create a repo using this command:
borg init [email protected]:my_repo
This repo will be located at /srv/borg/repos/client_a/my_repo
.
"Client B" can also create a repo, but will only be able to access it in "append only" mode.
Installa
ansible-galaxy install yurihs.borg_server
Licenza
mit
Download
86
Proprietario