2017-11-19 19:53:41 +00:00
|
|
|
- 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"
|
2017-12-08 06:07:01 +00:00
|
|
|
timeout: "{{ download_timeout }}"
|
2017-11-19 19:53:41 +00:00
|
|
|
when: internet_available and 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 }}"
|
2017-11-20 07:53:23 +00:00
|
|
|
when: sample_bk.stat.exists
|
2017-11-20 01:17:37 +00:00
|
|
|
|
2017-11-20 05:11:38 +00:00
|
|
|
- name: Make /library/calibre/metadata.db writable for Calibre client SW
|
2017-11-20 01:17:37 +00:00
|
|
|
file:
|
|
|
|
path: "{{ calibre_dbpath }}/metadata.db"
|
2017-11-20 08:16:05 +00:00
|
|
|
mode: "ugo+w"
|
|
|
|
#mode: 0666
|
2017-11-20 07:57:05 +00:00
|
|
|
#owner: pi
|
|
|
|
#group: pi
|
|
|
|
#owner: iiab-admin
|
|
|
|
#group: iiab-admin
|