Skip to content

Commit

Permalink
fix(stage1/pip) allow install duplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
gbloquel committed Jan 4, 2024
1 parent 33bb122 commit b716af3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ install-requirements: ## Install system dependencies
@echo "—————————————————————————————— SYSTEM REQUIREMENTS ———————————————————————————"
@sudo apt-get install -y \
python3 python3-dev python3-venv python3-pip direnv bash bash-completion \
lsb-release unzip curl sshpass skopeo
lsb-release unzip curl sshpass skopeo librsync-dev
@grep -q 'eval "$$(direnv hook bash)"' ~/.bashrc || \
echo 'eval "$$(direnv hook bash)"' >> ~/.bashrc

Expand Down
3 changes: 3 additions & 0 deletions roles/stage1_pip/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ packages_list:
- cryptography
- dnspython
- passlib
- duplicity

pip_root_folder_external: '/usr/lib/python3.11/EXTERNALLY-MANAGED'
5 changes: 5 additions & 0 deletions roles/stage1_pip/tasks/debian/_install.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- name: 'Ensure not exists {{ pip_root_folder_external }}'
file:
path: '{{ pip_root_folder_external }}'
state: absent

- name: Install Python packages # noqa: command-instead-of-module command-instead-of-shell
shell: >
pip install --no-index --find-links=/var/cache/pip/ {{ packages_list | join(' ') }}
11 changes: 11 additions & 0 deletions roles/stage1_pip/tasks/debian/_prepare.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
---
- name: Download dependencies for duplicity pip packages # noqa: command-instead-of-module
command: >
apt-get install -y --download-only librsync-dev
tags:
- online

- name: Install dependencies for duplicity
ansible.builtin.apt:
name: librsync-dev
state: present

- name: Download python packages # noqa: command-instead-of-module
shell: >
pip wheel --wheel-dir /var/cache/pip {{ packages_list | join(' ') }}
Expand Down

0 comments on commit b716af3

Please sign in to comment.