Jelajahi Sumber

[calibre] Fix role for books

Colin Powell 6 bulan lalu
induk
melakukan
2b15ac26e9

+ 2 - 2
lab/ansible/hosts

@@ -19,7 +19,7 @@ miniflux0.local
 podgrab0.local
 emus0.local
 
-calibre1.local
+calibre0.local
 devpi0.local
 fifttrackee0.local
 icecast0.local
@@ -138,7 +138,7 @@ wger0.local
 weewx0.local
 
 [books]
-calibre1.local
+calibre0.local
 
 [reading]
 bookwyrm0.local

+ 5 - 0
lab/ansible/playbook.yml

@@ -210,6 +210,11 @@
   roles:
     - role: navidrome
 
+- hosts: books
+  roles:
+    - role: immortal
+    - role: calibre-web
+
 - hosts: test
   roles:
     - role: direnv

+ 1 - 1
lab/ansible/roles/calibre-web/files/immortal.yml.j2 → lab/ansible/roles/calibre-web/files/immortal.yml

@@ -1,4 +1,4 @@
-cmd: cps -i 0.0.0.0 -l
+cmd: calibre-server /media/books --port 8089
 log:
     file: /var/log/calibre-web.log
     age: 86400 # log 1 day

+ 3 - 3
lab/ansible/roles/calibre-web/tasks/main.yml

@@ -1,15 +1,15 @@
 ---
 - name: Dependencies installed
   community.general.pkgng:
-    name: py311-pip,rust,libxslt,libxml2
+    name: py311-pip,rust,libxslt,libxml2,calibre,py311-cryptography
     state: latest
 
 - name: Calibre-Web installed
   shell: "pip install calibreweb"
 
 - name: Calibre-Web immortal file installed
-  template:
-    src: immortal.yml.j2
+  copy:
+    src: immortal.yml
     dest: /usr/local/etc/immortal/calibre-web.yml
     owner: root
     mode: 0644