In our install-borg role, we try to pin to a specific version of the software, but that's not always possible (case in point, the version of Python on Ubuntu 24.04 LTS won't work with the version of borg we're running elsewhere). Clarify this in the introductory comment. Change-Id: I4947e5cb78a14ea078ea998f43bb52673129a1cf
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
# We install into a virtualenv here for two reasons; we want a
|
|
# specific version pinned between server and client (at least as far
|
|
# as possible with the Python versions available) -- borg has had
|
|
# updates that required transitions so we don't want to use system
|
|
# packages where thing might get out of sync. Secondly we want to
|
|
# keep as few things as possible to go wrong when running backups.
|
|
- name: Install build deps
|
|
package:
|
|
name:
|
|
- python3-dev
|
|
- python3-venv
|
|
- libssl-dev
|
|
- openssl
|
|
- libacl1-dev
|
|
- libacl1
|
|
- build-essential
|
|
- pkg-config
|
|
|
|
- name: Install Noble specific fuse build deps
|
|
package:
|
|
name:
|
|
- libfuse3-dev
|
|
- fuse3
|
|
when: ansible_distribution_release == 'noble'
|
|
|
|
- name: Install fuse build deps for everything else
|
|
package:
|
|
name:
|
|
- libfuse-dev
|
|
- fuse
|
|
when: ansible_distribution_release != 'noble'
|
|
|
|
# Noble's python3.12 can't run 1.1.18 so we special case a newer
|
|
# version here.
|
|
# TODO(clarkb) Update borg across the board.
|
|
- name: Set fuse and version variables for Noble
|
|
set_fact:
|
|
_borg_version: "{{ borg_version | default('1.2.8', true) }}"
|
|
_fuse_extra: "pyfuse3"
|
|
when: ansible_distribution_release == 'noble'
|
|
|
|
- name: Set fuse and version variables for everything else
|
|
set_fact:
|
|
_borg_version: "{{ borg_version | default('1.1.18', true) }}"
|
|
_fuse_extra: "fuse"
|
|
when: ansible_distribution_release != 'noble'
|
|
|
|
- name: Create venv
|
|
include_role:
|
|
name: create-venv
|
|
vars:
|
|
create_venv_path: '/opt/borg'
|
|
|
|
- name: Install borg
|
|
pip:
|
|
# borg build deps are a little ... interesting, it needs cython
|
|
# but the requirements don't bring it in.
|
|
name:
|
|
- cython
|
|
- "borgbackup[{{ _fuse_extra }}]=={{ _borg_version }}"
|
|
virtualenv: /opt/borg
|