mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
30 lines
1,021 B
YAML
30 lines
1,021 B
YAML
- name: Check if sample book exists in /opt/iiab/downloads
|
|
stat:
|
|
path: "{{ content_base }}/downloads/{{ calibre_sample_book }}"
|
|
register: sample_bk
|
|
|
|
- name: Download sample book (mandatory since Calibre 3.x)
|
|
get_url:
|
|
url: "{{ iiab_download_url }}/{{ calibre_sample_book }}"
|
|
dest: "{{ content_base }}/downloads"
|
|
timeout: "{{ download_timeout }}"
|
|
when: not sample_bk.stat.exists
|
|
|
|
- name: Check if sample book exists in /opt/iiab/downloads
|
|
stat:
|
|
path: "{{ content_base }}/downloads/{{ calibre_sample_book }}"
|
|
register: sample_bk
|
|
|
|
- name: Incorporate sample book into Calibre DB (mandatory since Calibre 3.x)
|
|
shell: "calibredb add {{ content_base }}/downloads/{{ calibre_sample_book }} --with-library {{ calibre_dbpath }}"
|
|
when: sample_bk.stat.exists
|
|
|
|
- name: Make /library/calibre/metadata.db writable for Calibre client SW
|
|
file:
|
|
path: "{{ calibre_dbpath }}/metadata.db"
|
|
mode: "ugo+w"
|
|
#mode: 0666
|
|
#owner: pi
|
|
#group: pi
|
|
#owner: iiab-admin
|
|
#group: iiab-admin
|