From 3e6051f1ce6990e971718a102469bde0b88fafaa Mon Sep 17 00:00:00 2001 From: meisterfischy Date: Sat, 22 Jan 2022 17:27:49 +0100 Subject: First book is now downloaded --- roles/calibre/files/white.pdf | Bin 11540 -> 0 bytes roles/calibre/tasks/main.yml | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 roles/calibre/files/white.pdf diff --git a/roles/calibre/files/white.pdf b/roles/calibre/files/white.pdf deleted file mode 100644 index 95ea114..0000000 Binary files a/roles/calibre/files/white.pdf and /dev/null differ diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index 705d167..d3b0d06 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -14,16 +14,16 @@ path: /opt/calibre/library register: library -- name: Copy first book - copy: - dest: /opt/calibre - src: white.pdf +- name: Download first book + get_url: + url: https://github.com/progit/progit2/releases/download/2.1.336/progit.pdf + dest: /opt/calibre/progit.pdf become: true when: not library.stat.exists - name: Initialize calibre library shell: - cmd: calibredb --library-path=library add white.pdf & calibredb --library-path=library remove 1 + cmd: calibredb --library-path=library add progit.pdf chdir: /opt/calibre creates: library become: true @@ -38,7 +38,7 @@ - name: Remove first book file file: - path: /opt/calibre/white.pdf + path: /opt/calibre/progit.pdf state: absent become: true when: not library.stat.exists -- cgit v1.2.3