mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Update main.yml
This commit is contained in:
parent
5f84c7ecfa
commit
56e7a1f73e
1 changed files with 15 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
# 1. INSTALL THE LATEST CALIBRE 3.X+ (calibre, calibredb, calibre-server etc) ON ALL OS'S
|
||||
|
||||
- name: Check if /usr/bin/calibre exists
|
||||
- name: Does /usr/bin/calibre exist?
|
||||
stat:
|
||||
path: "/usr/bin/calibre"
|
||||
register: calib_executable
|
||||
|
@ -59,8 +59,7 @@
|
|||
# register: calibre_svc
|
||||
|
||||
- name: Stop Calibre service -- calibre-server by Kovid Goyal
|
||||
# systemd:
|
||||
service:
|
||||
systemd:
|
||||
name: calibre-serve
|
||||
state: stopped
|
||||
#enabled: no
|
||||
|
@ -87,7 +86,7 @@
|
|||
|
||||
# 4. CREATE CONTENT DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x)
|
||||
|
||||
- name: Check if /library/calibre/metadata.db exists
|
||||
- name: Does /library/calibre/metadata.db exist?
|
||||
stat:
|
||||
path: "{{ calibre_dbpath }}/metadata.db"
|
||||
register: calibre_db
|
||||
|
@ -104,20 +103,20 @@
|
|||
# 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)
|
||||
- name: Create symlink calibre.conf from sites-enabled to sites-available, for UNTESTED http://box/calibre etc (debuntu)
|
||||
file:
|
||||
src: /etc/apache2/sites-available/calibre.conf
|
||||
dest: /etc/apache2/sites-enabled/calibre.conf
|
||||
state: link
|
||||
when: calibre_enabled and is_debuntu
|
||||
|
||||
- name: Remove calibre.conf link if disabled (debuntu)
|
||||
- name: Remove symlink /etc/apache2/sites-enabled/calibre.conf (debuntu)
|
||||
file:
|
||||
dest: /etc/apache2/sites-enabled/calibre.conf
|
||||
state: absent
|
||||
when: (not calibre_enabled) and is_debuntu
|
||||
|
||||
- name: Enable Calibre service -- runs calibre-server by Kovid Goyal
|
||||
- name: Enable & Start Calibre service -- runs calibre-server by Kovid Goyal
|
||||
service:
|
||||
name: calibre-serve
|
||||
enabled: yes
|
||||
|
@ -126,14 +125,14 @@
|
|||
#async: 900
|
||||
#poll: 5
|
||||
|
||||
- name: Forcing apache to reread configs
|
||||
service:
|
||||
- name: Reload Apache
|
||||
systemd:
|
||||
name: "{{ apache_service }}"
|
||||
state: reloaded
|
||||
|
||||
- name: Add 'calibre' to list of services at {{ iiab_ini_file }}
|
||||
- name: Add 'calibre' variable values to {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
dest: "{{ iiab_ini_file }}"
|
||||
path: "{{ iiab_ini_file }}"
|
||||
section: calibre
|
||||
option: "{{ item.option }}"
|
||||
value: "{{ item.value }}"
|
||||
|
|
Loading…
Reference in a new issue