diff --git a/main.yml b/main.yml index 2903a51..0e90dbb 100644 --- a/main.yml +++ b/main.yml @@ -82,6 +82,9 @@ - name: Deploy QBittorrent import_tasks: tasks/qbittorrent.yml tags: qbittorrent_deploy + - name: Deploy Calibre + import_tasks: tasks/calibre-web.yml + tags: calibre-web_deploy - hosts: jackson diff --git a/tasks/calibre-web.yml b/tasks/calibre-web.yml new file mode 100644 index 0000000..565ec6f --- /dev/null +++ b/tasks/calibre-web.yml @@ -0,0 +1,35 @@ +--- +- name: Create folder structure + file: + path: "{{ item }}" + state: directory + with_items: + - "{{ data_dir }}/calibre" + +- name: Pull latest Calibre-Web Docker Image + docker_image: + name: lscr.io/linuxserver/calibre-web + tag: latest + source: pull + +- name: Deploy Calibre-Web Docker Container + docker_container: + name: calibre + image: lscr.io/linuxserver/calibre-web + recreate: true + restart_policy: unless-stopped + volumes: + - "{{ data_dir }}/calibre:/config" + - "{{ media_path }}/Books/Novels:/books" + env: + PUID: "{{ PUID }}" + PGID: "{{ PGID }}" + TZ: "{{ TZ }}" + networks: + - name: homelab + labels: + traefik.enable: "true" + traefik.http.routers.read.rule: Host(`read.fntz.net`) + traefik.http.routers.read.entrypoints: webSecure + traefik.http.routers.read.tls.certresolver: letsencrypt + traefik.http.services.read.loadbalancer.server.port: "8083"