diff --git a/roles/calibre-web/tasks/install.yml b/roles/calibre-web/tasks/install.yml index 0bae3428c..03356fa51 100644 --- a/roles/calibre-web/tasks/install.yml +++ b/roles/calibre-web/tasks/install.yml @@ -3,10 +3,17 @@ name: - imagemagick - python3-venv - #- python3-dev - - build-essential # 2023-03-18: Needed (e.g. on Ubuntu 22.04) now that scripts/ansible no longer installs python3-pip state: present +# https://github.com/iiab/iiab/pull/3496#issuecomment-1475094542 +- name: "Install packages: python3-dev, gcc to compile 'netifaces'" + package: + name: + - python3-dev # header files + - gcc # compiler + state: present + when: python_version is version('3.10', '>=') + - name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails lineinfile: path: /etc/ImageMagick-6/policy.xml @@ -44,7 +51,7 @@ # ignore_errors: True ## # Implementing this with Ansible command module for now. -- name: Download Calibre-Web dependencies (using pip) into python3 virtual environment {{ calibreweb_venv_path }} +- name: Download Calibre-Web dependencies from 'requirements.txt' into python3 virtual environment {{ calibreweb_venv_path }} pip: requirements: "{{ calibreweb_venv_path }}/requirements.txt" virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3 @@ -95,6 +102,14 @@ backup: yes when: not appdb.stat.exists +# https://github.com/iiab/iiab/pull/3496#issuecomment-1475094542 +#- name: "Uninstall packages: python3-dev, gcc used to compile 'netifaces'" +# package: +# name: +# - python3-dev # header files +# - gcc # compiler +# state: absent +# when: python_version is version('3.10', '>=') # RECORD Calibre-Web AS INSTALLED