mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
virtual environment calibre-web
This commit is contained in:
parent
e8e103cc23
commit
0dd0fd323b
2 changed files with 16 additions and 10 deletions
|
@ -7,8 +7,8 @@ calibreweb_enabled: False
|
||||||
|
|
||||||
calibreweb_port: 8083
|
calibreweb_port: 8083
|
||||||
calibreweb_url: /books
|
calibreweb_url: /books
|
||||||
calibreweb_path: "{{ iiab_base }}/calibre-web" # /opt/iiab/calibre-web
|
calibreweb_venv_path: /usr/local/calibre-web
|
||||||
calibreweb_exec_path: "{{ calibreweb_path }}/cps.py"
|
calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py"
|
||||||
|
|
||||||
# calibre-web folder to store its data files.
|
# calibre-web folder to store its data files.
|
||||||
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
state: directory
|
state: directory
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ calibreweb_home }}"
|
- "{{ calibreweb_home }}"
|
||||||
- "{{ calibreweb_path }}"
|
- "{{ calibreweb_venv_path }}"
|
||||||
- "{{ calibreweb_config }}"
|
- "{{ calibreweb_config }}"
|
||||||
|
|
||||||
## TODO: Calibre-web future release might get into pypi https://github.com/janeczku/calibre-web/issues/456
|
## TODO: Calibre-web future release might get into pypi https://github.com/janeczku/calibre-web/issues/456
|
||||||
- name: Download calibre-web github repository
|
- name: Download calibre-web github repository
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/janeczku/calibre-web.git
|
repo: https://github.com/janeczku/calibre-web.git
|
||||||
dest: "{{ calibreweb_path }}"
|
dest: "{{ calibreweb_venv_path }}"
|
||||||
force: yes
|
force: yes
|
||||||
#update: yes
|
#update: yes
|
||||||
depth: 1
|
depth: 1
|
||||||
|
@ -30,13 +30,19 @@
|
||||||
# ignore_errors: True
|
# ignore_errors: True
|
||||||
##
|
##
|
||||||
# Implementing this with Ansible command module for now.
|
# Implementing this with Ansible command module for now.
|
||||||
- name: Download calibre-web dependencies into vendor subdirectory
|
- name: Download calibre-web dependencies into virtual environment
|
||||||
command: pip install --target vendor -r ./requirements.txt
|
pip:
|
||||||
args:
|
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
|
||||||
chdir: "{{ calibreweb_path }}"
|
virtualenv: "{{ calibreweb_venv_path }}"
|
||||||
ignore_errors: True
|
virtualenv_site_packages: no
|
||||||
when: internet_available
|
when: internet_available
|
||||||
|
|
||||||
|
- name: Symlink 'vendor' to site-packages for python to keep cps.py happy'
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
src: "{{ calibreweb_venv_path }}/lib/python2.7/site-packages"
|
||||||
|
dest: "{{ calibreweb_venv_path }}/vendor"
|
||||||
|
|
||||||
- name: Create calibre-web systemd service unit file and calibre-web.conf for Apache
|
- name: Create calibre-web systemd service unit file and calibre-web.conf for Apache
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
|
@ -130,7 +136,7 @@
|
||||||
- option: calibreweb_url
|
- option: calibreweb_url
|
||||||
value: "{{ calibreweb_url }}"
|
value: "{{ calibreweb_url }}"
|
||||||
- option: calibreweb_path
|
- option: calibreweb_path
|
||||||
value: "{{ calibreweb_path }}"
|
value: "{{ calibreweb_venv_path }}"
|
||||||
- option: calibreweb_home
|
- option: calibreweb_home
|
||||||
value: "{{ calibreweb_home }}"
|
value: "{{ calibreweb_home }}"
|
||||||
- option: calibreweb_port
|
- option: calibreweb_port
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue