ADMIN-6028: added borg mount support

This commit is contained in:
akul 2025-09-10 09:38:29 +04:00
parent 2bc35fa45a
commit 2589bdef15
5 changed files with 23 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

@ -20,6 +20,9 @@ borg_pip_packages:
# - python3-virtualenv
# - python3-wheel
borg_mount_dependent_packages:
- fuse3-devel
borg_distro_packages:
- borgbackup
- borgmatic

View File

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