Merge pull request #2 from UnitedTraders/ADMIN-6028

ADMIN-6028: added borg mount support
This commit is contained in:
Alik Kurdyukov 2025-09-19 10:04:42 +04:00 committed by GitHub
commit 342b0bd8b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 26 additions and 0 deletions

View File

@ -1,4 +1,5 @@
---
borg_mount_support: false
borg_encryption_passphrase: ''
borg_exclude_patterns: []
borg_one_file_system: true

View File

@ -16,6 +16,10 @@ argument_specs:
type: str
required: false
description: Dependancy Packages to install borg(backup) and borgmatic.
borg_mount_support:
type: bool
required: false
description: Enable support for mounting Borg repositories.
borg_distro_packages:
type: str
required: false

View File

@ -16,6 +16,12 @@
state: enabled
when: ansible_distribution == 'Rocky' and ansible_distribution_major_version == "8"
- name: Install borg mount deps
ansible.builtin.package:
name: "{{ borg_mount_dependent_packages }}"
state: present
when: borg_mount_dependent_packages is defined and borg_mount_support
- name: Install build dependencies
ansible.builtin.package:
name: "{{ borg_pip_packages }}"
@ -30,6 +36,12 @@
virtualenv: "{{ borg_venv_path }}"
virtualenv_command: "{{ python_bin }} -m venv"
- name: Install borg mount dependent Python packages
ansible.builtin.pip:
name: "{{ borg_mount_dependent_python_packages }}"
virtualenv: "{{ borg_venv_path }}"
when: borg_mount_dependent_python_packages is defined and borg_mount_support
- name: Install dependent Python packages
ansible.builtin.pip:
name: "{{ borg_dependent_python_packages }}"

View File

@ -19,5 +19,11 @@ borg_distro_packages:
- borgbackup
- borgmatic
borg_mount_dependent_packages:
- fuse3-devel
borg_mount_dependent_python_packages:
- pyfuse3
python_bin: python3
pip_bin: pip3

View File

@ -3,6 +3,9 @@ borg_dependent_python_packages:
- cython
- pkgconfig
borg_mount_dependent_python_packages:
- pyfuse3
borg_python_packages:
- name: borgbackup
version: "{{ borg_version }}"