mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
Merge pull request #146 from jvonau/calweb_venv
sync from jvonau:calweb_venv
This commit is contained in:
commit
bcb31870fc
2 changed files with 16 additions and 10 deletions
|
@ -7,8 +7,8 @@ calibreweb_enabled: False
|
|||
|
||||
calibreweb_port: 8083
|
||||
calibreweb_url: /books
|
||||
calibreweb_path: "{{ iiab_base }}/calibre-web" # /opt/iiab/calibre-web
|
||||
calibreweb_exec_path: "{{ calibreweb_path }}/cps.py"
|
||||
calibreweb_venv_path: /usr/local/calibre-web
|
||||
calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py"
|
||||
|
||||
# calibre-web folder to store its data files.
|
||||
calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
state: directory
|
||||
with_items:
|
||||
- "{{ calibreweb_home }}"
|
||||
- "{{ calibreweb_path }}"
|
||||
- "{{ calibreweb_venv_path }}"
|
||||
- "{{ calibreweb_config }}"
|
||||
|
||||
## TODO: Calibre-web future release might get into pypi https://github.com/janeczku/calibre-web/issues/456
|
||||
- name: Download calibre-web github repository
|
||||
git:
|
||||
repo: https://github.com/janeczku/calibre-web.git
|
||||
dest: "{{ calibreweb_path }}"
|
||||
dest: "{{ calibreweb_venv_path }}"
|
||||
force: yes
|
||||
#update: yes
|
||||
depth: 1
|
||||
|
@ -30,13 +30,19 @@
|
|||
# ignore_errors: True
|
||||
##
|
||||
# Implementing this with Ansible command module for now.
|
||||
- name: Download calibre-web dependencies into vendor subdirectory
|
||||
command: pip install --target vendor -r ./requirements.txt
|
||||
args:
|
||||
chdir: "{{ calibreweb_path }}"
|
||||
ignore_errors: True
|
||||
- name: Download calibre-web dependencies into virtual environment
|
||||
pip:
|
||||
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
|
||||
virtualenv: "{{ calibreweb_venv_path }}"
|
||||
virtualenv_site_packages: no
|
||||
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
|
||||
template:
|
||||
src: "{{ item.src }}"
|
||||
|
@ -130,7 +136,7 @@
|
|||
- option: calibreweb_url
|
||||
value: "{{ calibreweb_url }}"
|
||||
- option: calibreweb_path
|
||||
value: "{{ calibreweb_path }}"
|
||||
value: "{{ calibreweb_venv_path }}"
|
||||
- option: calibreweb_home
|
||||
value: "{{ calibreweb_home }}"
|
||||
- option: calibreweb_port
|
||||
|
|
Loading…
Reference in a new issue