diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index 980d65581..c5adabde2 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -14,8 +14,8 @@ - name: Install Calibre (OS's other than CentOS) # the fedora rpm arm version, though older, takes care of dependencies, and exists - package: name={{ item }} - state=present + package: name={{ item }} + state=latest with_items: - calibre when: calibre_install and ansible_distribution != 'CentOS' @@ -32,13 +32,13 @@ - { src: 'calibre.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'} when: calibre_install -- name: Create the link for sites-enabled (debuntu) +- name: Create the link for sites-enabled, containing ProxyPass[Reverse]...localhost:8080 (debuntu) file: src=/etc/apache2/sites-available/calibre.conf dest=/etc/apache2/sites-enabled/calibre.conf state=link when: is_debuntu and calibre_enabled -- name: Enable Calibre server +- name: Enable Calibre service -- runs calibre-server by Kovid Goyal service: name=calibre-serve enabled=yes state=started @@ -46,7 +46,7 @@ #poll: 5 when: calibre_enabled -- name: Disable Calibre server +- name: Disable Calibre service -- stops calibre-server by Kovid Goyal service: name=calibre-serve enabled=no state=stopped diff --git a/roles/calibre/templates/calibre.conf b/roles/calibre/templates/calibre.conf index 6508f9105..82bfd6a4f 100644 --- a/roles/calibre/templates/calibre.conf +++ b/roles/calibre/templates/calibre.conf @@ -1,2 +1,18 @@ 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 }} + +# http://box/liv mnemonic for Haitian Creole speakers +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 }} + +# http://box/livres mnemonic for French speakers +ProxyPass /livres http://localhost:{{ calibre_port }} +ProxyPassReverse /livres http://localhost:{{ calibre_port }}