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
|
# 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:
|
stat:
|
||||||
path: "/usr/bin/calibre"
|
path: "/usr/bin/calibre"
|
||||||
register: calib_executable
|
register: calib_executable
|
||||||
|
@ -59,8 +59,7 @@
|
||||||
# register: calibre_svc
|
# register: calibre_svc
|
||||||
|
|
||||||
- name: Stop Calibre service -- calibre-server by Kovid Goyal
|
- name: Stop Calibre service -- calibre-server by Kovid Goyal
|
||||||
# systemd:
|
systemd:
|
||||||
service:
|
|
||||||
name: calibre-serve
|
name: calibre-serve
|
||||||
state: stopped
|
state: stopped
|
||||||
#enabled: no
|
#enabled: no
|
||||||
|
@ -87,7 +86,7 @@
|
||||||
|
|
||||||
# 4. CREATE CONTENT DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x)
|
# 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:
|
stat:
|
||||||
path: "{{ calibre_dbpath }}/metadata.db"
|
path: "{{ calibre_dbpath }}/metadata.db"
|
||||||
register: calibre_db
|
register: calibre_db
|
||||||
|
@ -104,20 +103,20 @@
|
||||||
# https://github.com/iiab/iiab/tree/master/roles/calibre-web/templates/calibre-web.conf.j2
|
# 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
|
# (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 !)
|
# 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:
|
file:
|
||||||
src: /etc/apache2/sites-available/calibre.conf
|
src: /etc/apache2/sites-available/calibre.conf
|
||||||
dest: /etc/apache2/sites-enabled/calibre.conf
|
dest: /etc/apache2/sites-enabled/calibre.conf
|
||||||
state: link
|
state: link
|
||||||
when: calibre_enabled and is_debuntu
|
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:
|
file:
|
||||||
dest: /etc/apache2/sites-enabled/calibre.conf
|
dest: /etc/apache2/sites-enabled/calibre.conf
|
||||||
state: absent
|
state: absent
|
||||||
when: (not calibre_enabled) and is_debuntu
|
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:
|
service:
|
||||||
name: calibre-serve
|
name: calibre-serve
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
@ -126,14 +125,14 @@
|
||||||
#async: 900
|
#async: 900
|
||||||
#poll: 5
|
#poll: 5
|
||||||
|
|
||||||
- name: Forcing apache to reread configs
|
- name: Reload Apache
|
||||||
service:
|
systemd:
|
||||||
name: "{{ apache_service }}"
|
name: "{{ apache_service }}"
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
- name: Add 'calibre' to list of services at {{ iiab_ini_file }}
|
- name: Add 'calibre' variable values to {{ iiab_ini_file }}
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "{{ iiab_ini_file }}"
|
path: "{{ iiab_ini_file }}"
|
||||||
section: calibre
|
section: calibre
|
||||||
option: "{{ item.option }}"
|
option: "{{ item.option }}"
|
||||||
value: "{{ item.value }}"
|
value: "{{ item.value }}"
|
||||||
|
|
Loading…
Reference in a new issue