diff --git a/README.md b/README.md index 157a8ec..6abc3ba 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl - `borgmatic_cron_checks_day`: Day when cron job for infrequent checks will run. Defaults to `{{ 28 | random }}` - `borgmatic_cron_checks_hour`: Hour when cron job for infrequent checks will run. Defaults to `{{ range(7, 24) | random }}` - `borgmatic_cron_checks_minute`: Minute when cron job for infrequent checks will run. Defaults to `{{ 59 | random }}` +- `borgmatic_fuse_support`: Adds borgmatics fuse mount support. Defaults to `false` ### Optional Arguments for [BorgBase.com](https://www.borgbase.com) repository auto creation diff --git a/defaults/main.yml b/defaults/main.yml index c3969b9..67a385b 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,3 +43,4 @@ borgmatic_cron_minute: "{{ 59 | random(seed=inventory_hostname) }}" borgmatic_cron_checks_day: "{{ range(1, 28) | random(seed=inventory_hostname) }}" borgmatic_cron_checks_hour: "{{ range(9, 24) | random(seed=inventory_hostname) }}" borgmatic_cron_checks_minute: "{{ 59 | random(seed=inventory_hostname) }}" +borgmatic_fuse_support: "false" \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index a023705..5d374ca 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,6 +19,12 @@ name: "{{ borg_packages }}" state: present +- name: adding fuse support + package: + name: "{{ borg_packages_fuse }}" + state: present + when: borgmatic_fuse_support + - name: Create virtualenv for borg pip: name: pip-tools @@ -29,7 +35,13 @@ pip: name: "{{ borg_python_packages }}" virtualenv: /opt/borgmatic - when: borg_python_packages is defined + when: borg_python_packages is defined and not borgmatic_fuse_support + +- name: Install required Python Packages with fuse support + pip: + name: "{{ borg_python_packages_fuse }}" + virtualenv: /opt/borgmatic + when: borg_python_packages is defined and borgmatic_fuse_support - name: Create borgmatic command in /usr/local/bin copy: diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml index 0da7866..0e3113f 100644 --- a/vars/Archlinux.yml +++ b/vars/Archlinux.yml @@ -10,5 +10,14 @@ borg_python_packages: - borgbackup - borgmatic +borg_packages_fuse: + - fuse2 + +borg_python_packages_fuse: + - cython + - borgbackup[fuse] + - borgmatic + - python-llfuse + python_bin: python3 -pip_bin: pip3 +pip_bin: pip3 \ No newline at end of file diff --git a/vars/Debian.yml b/vars/Debian.yml index ce11e99..3ccb7a9 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -12,10 +12,18 @@ borg_packages: - openssh-client - cron -python_bin: python3 -pip_bin: pip3 - borg_python_packages: - cython - borgbackup - borgmatic + +borg_packages_fuse: + - libfuse-dev + +borg_python_packages_fuse: + - cython + - borgbackup[fuse] + - borgmatic + +python_bin: python3 +pip_bin: pip3 \ No newline at end of file diff --git a/vars/Fedora.yml b/vars/Fedora.yml index e9f43c2..b4ea357 100644 --- a/vars/Fedora.yml +++ b/vars/Fedora.yml @@ -13,10 +13,20 @@ borg_packages: - openssh-clients - cronie -python_bin: python3 -pip_bin: pip3 - borg_python_packages: - cython - borgbackup - borgmatic + +borg_packages_fuse: + - fuse-devel + - fuse + - pkgconfig + +borg_python_packages_fuse: + - cython + - borgbackup[fuse] + - borgmatic + +python_bin: python3 +pip_bin: pip3 \ No newline at end of file diff --git a/vars/RedHat-8.yml b/vars/RedHat-8.yml index 54366d9..fd60aaf 100644 --- a/vars/RedHat-8.yml +++ b/vars/RedHat-8.yml @@ -13,10 +13,20 @@ borg_packages: - openssh-clients - cronie -python_bin: python3 -pip_bin: pip3 - borg_python_packages: - cython - borgbackup - borgmatic + +borg_packages_fuse: + - fuse-devel + - fuse + - pkgconfig + +borg_python_packages_fuse: + - cython + - borgbackup[fuse] + - borgmatic + +python_bin: python3 +pip_bin: pip3 \ No newline at end of file diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 461aeac..b87ce5c 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -12,10 +12,20 @@ borg_packages: - openssh-clients - cronie -python_bin: python3 -pip_bin: pip3 - borg_python_packages: - cython - borgbackup - borgmatic + +borg_packages_fuse: + - fuse-devel + - fuse + - pkgconfig + +borg_python_packages_fuse: + - cython + - borgbackup[fuse] + - borgmatic + +python_bin: python3 +pip_bin: pip3 \ No newline at end of file