diff --git a/roles/9-local-addons/tasks/main.yml b/roles/9-local-addons/tasks/main.yml index 5b8028ec8..ba8d7d74b 100644 --- a/roles/9-local-addons/tasks/main.yml +++ b/roles/9-local-addons/tasks/main.yml @@ -9,6 +9,12 @@ when: calibre_install tags: calibre +- name: CALIBRE-WEB + include_role: + name: calibre-web + when: calibreweb_install + tags: calibre-web + - name: Recording STAGE 9 HAS COMPLETED ==================== lineinfile: dest: /etc/iiab/iiab.env diff --git a/roles/calibre-web/README.rst b/roles/calibre-web/README.rst new file mode 100644 index 000000000..e248814b8 --- /dev/null +++ b/roles/calibre-web/README.rst @@ -0,0 +1,94 @@ +================== +Calibre-Web README +================== + +Calibre-Web server provides a clean interface for browsing, reading and +downloading e-books using an existing Calibre database. + +This Ansible role installs Calibre-Web in Internet-in-a-Box (we'll call it +'calibre-web' from here on down, noting that ``calibreweb_*`` variables do not +include the dash, per Ansible recommendations.) + +Access +------ + +After installation you can access calibre-web at http://box/books + +Log in with administrative account:: + + Username: Admin + Password: changeme + +If the default configuration is not found, calibre-web server creates a +new settings file with calibre-web's own default administrative account:: + + Username: admin + Password: admin123 + +Backend +------- + +You can manage the backend calibre-web server manually with these commands:: + + systemctl enable calibre-web + systemctl restart calibre-web + systemctl status calibre-web + systemctl stop calibre-web + +Configuration +------------- + +To configure calibre-web, login as user 'Admin' then click on 'Admin' panel on +top. See 'Configuration' options near the bottom of the page. + +Critical settings are stored in:: + + /library/calibre-web/config/app.db + +Your e-book metadata is stored in a Calibre-style database:: + + /library/calibre-web/metadata.db + +See also:: + + /library/calibre-web/metadata_db_prefs_backup.json + +Back Up Your Content +-------------------- + +Please back up the entire folder ``/library/calibre-web`` before upgrading — +as it contains your calibre-web content **and** settings! + +Upgrading +--------- + +Reinstalling calibre-web automatically upgrades to the latest version. + +Back up your content **and** settings before reinstalling, as explained above. + +**Move your /library/calibre-web/metadata.db if you're sure you want to install +a bare/minimal metadata.db and force default settings. Then run**:: + + cd /opt/iiab/iiab + ./runrole calibre-web + +Or, to reinstall all of Internet-in-a-Box:: + + cd /opt/iiab/iiab + ./iiab-install --reinstall + +Or, if you just want to upgrade calibre-web code alone, prior to proceeding +manually:: + + cd /opt/iiab/calibre-web + git pull + +Known Issues +------------ + +* Trying to access an empty public bookshelf causes a system error. + +* As of August 2018, calibre-web doesn't yet include Calibre's e-book + conversion functionality (Calibre 3.27.1 [released 2018-07-06] allows + teachers to convert between PDF, epub, txt etc — to permit reading on a wider + array client devices and client software). diff --git a/roles/calibre-web/defaults/main.yml b/roles/calibre-web/defaults/main.yml new file mode 100644 index 000000000..ac47008c2 --- /dev/null +++ b/roles/calibre-web/defaults/main.yml @@ -0,0 +1,29 @@ +# The values here are defaults. +# To override them edit /etc/iiab/local_vars.yml + +# Installation Variables +calibreweb_install: False +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" + +# calibre-web folder to store its data files. +calibreweb_home: "{{ content_base }}/calibre-web" # /library/calibre-web +# calibre-web folder to store configuration files. +calibreweb_config: "{{ calibreweb_home }}/config" + +# calibre-web setup will be provisioned with default administrative account, +# metadata.db and language if /library/calibre-web/metadata.db does not exist. +# NOT CURRENTLY IN USE: calibreweb_provision: True +calibreweb_settings_database: app.db +calibreweb_database: metadata.db + +# calibre-web system user +calibreweb_user: root + +# calibre-web admin account +# calibreweb_admin_user: Admin +# calibreweb_admin_password: changeme diff --git a/roles/calibre-web/files/app.db b/roles/calibre-web/files/app.db new file mode 100644 index 000000000..719553a34 Binary files /dev/null and b/roles/calibre-web/files/app.db differ diff --git a/roles/calibre-web/files/metadata.db b/roles/calibre-web/files/metadata.db new file mode 100644 index 000000000..828afa0ca Binary files /dev/null and b/roles/calibre-web/files/metadata.db differ diff --git a/roles/calibre-web/files/metadata_db_prefs_backup.json b/roles/calibre-web/files/metadata_db_prefs_backup.json new file mode 100644 index 000000000..a6b74b252 --- /dev/null +++ b/roles/calibre-web/files/metadata_db_prefs_backup.json @@ -0,0 +1,566 @@ +{ + "tag_browser_hidden_categories": [], + "library_view books view state": { + "column_positions": { + "languages": 11, + "publisher": 8, + "pubdate": 9, + "rating": 5, + "title": 1, + "tags": 6, + "series": 7, + "timestamp": 3, + "authors": 2, + "ondevice": 0, + "size": 4, + "last_modified": 10 + }, + "last_modified_injected": true, + "column_sizes": { + "languages": 0, + "publisher": 62, + "pubdate": 105, + "rating": 86, + "title": 51, + "tags": 100, + "series": 52, + "timestamp": 76, + "authors": 78, + "last_modified": 0, + "size": 88 + }, + "sort_history": [ + [ + "timestamp", + false + ] + ], + "languages_injected": true, + "column_alignment": { + "size": "center", + "pubdate": "center", + "timestamp": "center" + }, + "hidden_columns": [ + "last_modified", + "languages" + ] + }, + "user_categories": {}, + "saved_searches": {}, + "field_metadata": { + "pubdate": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "pubdate" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 15, + "is_csp": false, + "datatype": "datetime", + "name": "Ver\u00f6ffentlicht", + "label": "pubdate", + "is_category": false, + "display": { + "date_format": "MMM yyyy" + }, + "kind": "field", + "column": null + }, + "author_sort": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "author_sort" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 12, + "is_csp": false, + "datatype": "text", + "name": "Autorensortierung", + "label": "author_sort", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "tags": { + "table": "tags", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "search_terms": [ + "tags", + "tag" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "name", + "is_csp": false, + "datatype": "text", + "name": "Schlagw\u00f6rter", + "link_column": "tag", + "label": "tags", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 6, + "column": "name" + }, + "id": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "id" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 0, + "is_csp": false, + "datatype": "int", + "name": null, + "label": "id", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "news": { + "table": "news", + "is_multiple": {}, + "search_terms": [], + "is_editable": true, + "is_custom": false, + "category_sort": "name", + "is_csp": false, + "datatype": null, + "name": "Nachrichten", + "label": "news", + "is_category": true, + "display": {}, + "kind": "category", + "column": "name" + }, + "cover": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "cover" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 17, + "is_csp": false, + "datatype": "int", + "name": "Titelbild", + "label": "cover", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "marked": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "marked" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 23, + "is_csp": false, + "datatype": "text", + "name": null, + "label": "marked", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "series_sort": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "series_sort" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 24, + "is_csp": false, + "datatype": "text", + "name": "Seriensortierung", + "label": "series_sort", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "comments": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "comments", + "comment" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 7, + "is_csp": false, + "datatype": "text", + "name": "Kommentare", + "label": "comments", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "ondevice": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "ondevice" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 22, + "is_csp": false, + "datatype": "text", + "name": "Auf Ger\u00e4t", + "label": "ondevice", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "size": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "size" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 4, + "is_csp": false, + "datatype": "float", + "name": "Gr\u00f6\u00dfe", + "label": "size", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "title": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "title" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 1, + "is_csp": false, + "datatype": "text", + "name": "Titel", + "label": "title", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "languages": { + "table": "languages", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "search_terms": [ + "languages", + "language" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "lang_code", + "is_csp": false, + "datatype": "text", + "name": "Sprachen", + "link_column": "lang_code", + "label": "languages", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 21, + "column": "lang_code" + }, + "series_index": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "series_index" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 10, + "is_csp": false, + "datatype": "float", + "name": null, + "label": "series_index", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "path": { + "table": null, + "is_multiple": {}, + "search_terms": [], + "is_editable": true, + "is_custom": false, + "rec_index": 14, + "is_csp": false, + "datatype": "text", + "name": "Pfad", + "label": "path", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "last_modified": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "last_modified" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 19, + "is_csp": false, + "datatype": "datetime", + "name": "Ge\u00e4ndert", + "label": "last_modified", + "is_category": false, + "display": { + "date_format": "dd MMM yyyy" + }, + "kind": "field", + "column": null + }, + "uuid": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "uuid" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 16, + "is_csp": false, + "datatype": "text", + "name": null, + "label": "uuid", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "identifiers": { + "table": null, + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "search_terms": [ + "identifiers", + "identifier", + "isbn" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 20, + "is_csp": true, + "datatype": "text", + "name": "Kennungen", + "label": "identifiers", + "is_category": true, + "display": {}, + "kind": "field", + "column": null + }, + "formats": { + "table": null, + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": ",", + "list_to_ui": ", " + }, + "search_terms": [ + "formats", + "format" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 13, + "is_csp": false, + "datatype": "text", + "name": "Formate", + "label": "formats", + "is_category": true, + "display": {}, + "kind": "field", + "column": null + }, + "au_map": { + "table": null, + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": null, + "list_to_ui": null + }, + "search_terms": [], + "is_editable": true, + "is_custom": false, + "rec_index": 18, + "is_csp": false, + "datatype": "text", + "name": null, + "label": "au_map", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + }, + "rating": { + "table": "ratings", + "is_multiple": {}, + "search_terms": [ + "rating" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "rating", + "is_csp": false, + "datatype": "rating", + "name": "Bewertung", + "link_column": "rating", + "label": "rating", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 5, + "column": "rating" + }, + "publisher": { + "table": "publishers", + "is_multiple": {}, + "search_terms": [ + "publisher" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "name", + "is_csp": false, + "datatype": "text", + "name": "Verlag", + "link_column": "publisher", + "label": "publisher", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 9, + "column": "name" + }, + "series": { + "table": "series", + "is_multiple": {}, + "search_terms": [ + "series" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "(title_sort(name))", + "is_csp": false, + "datatype": "series", + "name": "Serie", + "link_column": "series", + "label": "series", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 8, + "column": "name" + }, + "timestamp": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "date" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 3, + "is_csp": false, + "datatype": "datetime", + "name": "Datum", + "label": "timestamp", + "is_category": false, + "display": { + "date_format": "dd MMM yyyy" + }, + "kind": "field", + "column": null + }, + "authors": { + "table": "authors", + "is_multiple": { + "cache_to_list": ",", + "ui_to_list": "&", + "list_to_ui": " & " + }, + "search_terms": [ + "authors", + "author" + ], + "is_editable": true, + "is_custom": false, + "category_sort": "sort", + "is_csp": false, + "datatype": "text", + "name": "Autoren", + "link_column": "author", + "label": "authors", + "is_category": true, + "display": {}, + "kind": "field", + "rec_index": 2, + "column": "name" + }, + "sort": { + "table": null, + "is_multiple": {}, + "search_terms": [ + "title_sort" + ], + "is_editable": true, + "is_custom": false, + "rec_index": 11, + "is_csp": false, + "datatype": "text", + "name": "Titelsortierung", + "label": "sort", + "is_category": false, + "display": {}, + "kind": "field", + "column": null + } + }, + "bools_are_tristate": true, + "grouped_search_terms": {} +} \ No newline at end of file diff --git a/roles/calibre-web/tasks/main.yml b/roles/calibre-web/tasks/main.yml new file mode 100644 index 000000000..7856e7e8e --- /dev/null +++ b/roles/calibre-web/tasks/main.yml @@ -0,0 +1,142 @@ +- name: Create calibre-web folders to store data and configuration files + file: + path: "{{ item }}" + owner: "{{ calibreweb_user }}" + group: "{{ apache_user }}" + mode: 0755 + state: directory + with_items: + - "{{ calibreweb_home }}" + - "{{ calibreweb_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 }}" + force: yes + #update: yes + depth: 1 + version: master + when: internet_available + +## Ansible Pip Bug: Cannot use 'chdir' with 'env' https://github.com/ansible/ansible/issues/37912 (Patch landed) +#- name: Download calibre-web dependencies into vendor subdirectory. +# pip: +# requirements: "{{ calibreweb_path }}/requirements.txt" +# chdir: "{{ calibreweb_path }}" +# extra_args: '--target vendor' +# 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 + when: internet_available + +- name: Create calibre-web systemd service unit file and calibre-web.conf for Apache + template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + mode: "{{ item.mode }}" + owner: "{{ calibreweb_user }}" + group: "{{ apache_user }}" + with_items: + - { src: 'calibre-web.service.j2', dest: '/etc/systemd/system/calibre-web.service', mode: '0644' } + - { src: 'calibre-web.conf.j2', dest: '/etc/apache2/sites-available/calibre-web.conf', mode: '0644' } + +- name: Does /library/calibre-web/metadata.db exist? + stat: + path: /library/calibre-web/metadata.db + register: metadatadb + +- name: Provision/Copy both default metadata files into /library/calibre-web IF metadata.db did not exist + copy: + src: "{{ item }}" + dest: "{{ calibreweb_home }}" + owner: "{{ calibreweb_user }}" + group: "{{ apache_user }}" + mode: 0644 + backup: yes + with_items: + - roles/calibre-web/files/metadata.db + - roles/calibre-web/files/metadata_db_prefs_backup.json + when: not metadatadb.stat.exists + #when: calibreweb_provision + +- name: Provision/Copy default admin settings to /library/calibre-web/config/app.db IF metadata.db did not exist + copy: + src: roles/calibre-web/files/app.db + dest: "{{ calibreweb_config }}" + owner: "{{ calibreweb_user }}" + group: "{{ apache_user }}" + mode: 0644 + backup: yes + when: not metadatadb.stat.exists + #when: calibreweb_provision + +- name: Enable and restart calibre-web service + systemd: + name: calibre-web + daemon_reload: yes + enabled: yes + state: restarted + when: calibreweb_enabled + +- name: Enable http://box/calibre-web with Apache + command: a2ensite calibre-web.conf + when: calibreweb_enabled + +#- name: Restart Apache after enabling calibre-web httpd2 site +# command: apachectl -k graceful +# when: calibreweb_enabled + +- name: Disable calibre-web service + systemd: + name: calibre-web + daemon_reload: yes + enabled: no + state: stopped + when: not calibreweb_enabled + +- name: Disable http://box/calibre-web with Apache + command: a2dissite calibre-web.conf + when: not calibreweb_enabled + +#- name: Restart Apache after disabling calibre-web httpd2 site +# command: apachectl -k graceful +# when: not calibreweb_enabled + +- name: Restart Apache + systemd: + name: "{{ apache_service }}" # httpd or apache2 + state: restarted + +- name: Add 'calibre-web' to list of services at /etc/iiab/iiab.ini + ini_file: + dest: "{{ service_filelist }}" + section: calibre-web + option: "{{ item.option }}" + value: "{{ item.value }}" + with_items: + - option: name + value: calibre-web + - option: description + value: '"calibre-web is a web app providing a clean interface for browsing, reading and downloading e-books."' + - option: calibreweb_url + value: "{{ calibreweb_url }}" + - option: calibreweb_path + value: "{{ calibreweb_path }}" + - option: calibreweb_home + value: "{{ calibreweb_home }}" + - option: calibreweb_port + value: "{{ calibreweb_port }}" + - option: calibreweb_database + value: "{{ calibreweb_database }}" + - option: calibreweb_enabled + value: "{{ calibreweb_enabled }}" +# - option: calibreweb_provision +# value: "{{ calibreweb_provision }}" diff --git a/roles/calibre-web/templates/calibre-web.conf.j2 b/roles/calibre-web/templates/calibre-web.conf.j2 new file mode 100644 index 000000000..33a95a950 --- /dev/null +++ b/roles/calibre-web/templates/calibre-web.conf.j2 @@ -0,0 +1,8 @@ + + + RequestHeader set X-SCRIPT-NAME {{ calibreweb_url }} + RequestHeader set X-SCHEME http + ProxyPass http://localhost:{{ calibreweb_port }}/ + ProxyPassReverse http://localhost:{{ calibreweb_port }}/ + + diff --git a/roles/calibre-web/templates/calibre-web.service.j2 b/roles/calibre-web/templates/calibre-web.service.j2 new file mode 100644 index 000000000..733a723e3 --- /dev/null +++ b/roles/calibre-web/templates/calibre-web.service.j2 @@ -0,0 +1,9 @@ +Description=Calibre-Web + +[Service] +Type=simple +User={{ calibreweb_user }} +ExecStart={{ calibreweb_exec_path }} -p {{ calibreweb_config }}/{{ calibreweb_settings_database }} + +[Install] +WantedBy=multi-user.target diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index 5cfb310d0..ec8b8e62a 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -99,8 +99,13 @@ # 5. WRAP UP: ENABLE CALIBRE SERVICE, http://box/books ETC -# http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/books ARE A MESS (BOOKS RARELY DISPLAY) -- name: Create calibre.conf link for UNTESTED http://box/books etc (debuntu) +# http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/calibre ARE A MESS (BOOKS RARELY DISPLAY) +# +# 2018-08-27 POSSIBLE FIX...CONSIDER THIS ProxyPass / ProxyPassReverse TECHNIQUE: +# https://github.com/iiab/iiab/tree/master/roles/calibre-web/templates/calibre-web.conf.j2 +# (anyway this works great for calibre-web, allowing http://box/books +# to work even better than http://box:8083 when box == 192.168.0.x !) +- name: Create calibre.conf link for UNTESTED http://box/calibre etc (debuntu) file: src: /etc/apache2/sites-available/calibre.conf dest: /etc/apache2/sites-enabled/calibre.conf diff --git a/roles/calibre/templates/calibre.conf b/roles/calibre/templates/calibre.conf index 5f5317268..0b46aad63 100644 --- a/roles/calibre/templates/calibre.conf +++ b/roles/calibre/templates/calibre.conf @@ -1,23 +1,23 @@ -# http://box/XYZ mnemonic if properly set within /etc/iiab/local_vars.yml +# http://box/XYZ mnemonic set for box/calibre within roles/calibre/defaults/main.yml for now [FAILS AS OF 2018-08-27] ProxyPass /{{ calibre_web_path }} http://localhost:{{ calibre_port }} ProxyPassReverse /{{ calibre_web_path }} http://localhost:{{ calibre_port }} # http://box/books mnemonic for English speakers -ProxyPass /books http://localhost:{{ calibre_port }} -ProxyPassReverse /books http://localhost:{{ calibre_port }} +#ProxyPass /books http://localhost:{{ calibre_port }} +#ProxyPassReverse /books http://localhost:{{ calibre_port }} # http://box/liv mnemonic for Haitian Creole speakers -ProxyPass /liv http://localhost:{{ calibre_port }} -ProxyPassReverse /liv http://localhost:{{ calibre_port }} +#ProxyPass /liv http://localhost:{{ calibre_port }} +#ProxyPassReverse /liv http://localhost:{{ calibre_port }} # http://box/libros mnemonic for Spanish speakers -ProxyPass /libros http://localhost:{{ calibre_port }} -ProxyPassReverse /libros http://localhost:{{ calibre_port }} +#ProxyPass /libros http://localhost:{{ calibre_port }} +#ProxyPassReverse /libros http://localhost:{{ calibre_port }} # http://box/livres mnemonic for French speakers -ProxyPass /livres http://localhost:{{ calibre_port }} -ProxyPassReverse /livres http://localhost:{{ calibre_port }} +#ProxyPass /livres http://localhost:{{ calibre_port }} +#ProxyPassReverse /livres http://localhost:{{ calibre_port }} # http://box/livros mnemonic for Portuguese speakers -ProxyPass /livros http://localhost:{{ calibre_port }} -ProxyPassReverse /livros http://localhost:{{ calibre_port }} +#ProxyPass /livros http://localhost:{{ calibre_port }} +#ProxyPassReverse /livros http://localhost:{{ calibre_port }} diff --git a/roles/sugarizer/tasks/main.yml b/roles/sugarizer/tasks/main.yml index ff1ffe6c6..df2ce5cab 100644 --- a/roles/sugarizer/tasks/main.yml +++ b/roles/sugarizer/tasks/main.yml @@ -200,7 +200,7 @@ - name: Restart Apache so http://box/sugarizer works (not just http://box:8089) systemd: - name: apache2 + name: "{{ apache_service }}" # httpd or apache2 state: restarted when: sugarizer_enabled diff --git a/vars/default_vars.yml b/vars/default_vars.yml index e7a92d215..4654ae3e0 100644 --- a/vars/default_vars.yml +++ b/vars/default_vars.yml @@ -277,6 +277,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: True +calibreweb_enabled: True + # DokuWiki dokuwiki_install: False dokuwiki_enabled: False diff --git a/vars/local_vars_big.yml b/vars/local_vars_big.yml index 3c30426bc..464ca014f 100644 --- a/vars/local_vars_big.yml +++ b/vars/local_vars_big.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: True +calibreweb_enabled: True + dokuwiki_install: True dokuwiki_enabled: True diff --git a/vars/local_vars_big_vpn.yml b/vars/local_vars_big_vpn.yml index 393e84f86..1e7db9e49 100644 --- a/vars/local_vars_big_vpn.yml +++ b/vars/local_vars_big_vpn.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: True +calibreweb_enabled: True + dokuwiki_install: True dokuwiki_enabled: True diff --git a/vars/local_vars_medium.yml b/vars/local_vars_medium.yml index 43f17384a..2848aa0ce 100644 --- a/vars/local_vars_medium.yml +++ b/vars/local_vars_medium.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: True +calibreweb_enabled: True + dokuwiki_install: False dokuwiki_enabled: False diff --git a/vars/local_vars_medium_vpn.yml b/vars/local_vars_medium_vpn.yml index b78bc5f5a..d73fe8699 100644 --- a/vars/local_vars_medium_vpn.yml +++ b/vars/local_vars_medium_vpn.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: True +calibreweb_enabled: True + dokuwiki_install: False dokuwiki_enabled: False diff --git a/vars/local_vars_min.yml b/vars/local_vars_min.yml index 78e53e111..f0e55f4dc 100644 --- a/vars/local_vars_min.yml +++ b/vars/local_vars_min.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: False +calibreweb_enabled: False + dokuwiki_install: False dokuwiki_enabled: False diff --git a/vars/local_vars_min_vpn.yml b/vars/local_vars_min_vpn.yml index a60ecaaff..d3b52eb79 100644 --- a/vars/local_vars_min_vpn.yml +++ b/vars/local_vars_min_vpn.yml @@ -149,6 +149,9 @@ calibre_port: 8080 calibre_web_path: calibre #NEEDS WORK: https://github.com/iiab/iiab/issues/529 # In addition to: http://box/books box/libros box/livres box/livros box/liv +calibreweb_install: False +calibreweb_enabled: False + dokuwiki_install: False dokuwiki_enabled: False