From 6f227976d89855944af30b853448dfd5563b907c Mon Sep 17 00:00:00 2001 From: Tobias Date: Sun, 5 Jul 2026 08:33:49 +0000 Subject: [PATCH] Add playbooks/calibre.yml --- playbooks/calibre.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 playbooks/calibre.yml diff --git a/playbooks/calibre.yml b/playbooks/calibre.yml new file mode 100644 index 0000000..3ea4046 --- /dev/null +++ b/playbooks/calibre.yml @@ -0,0 +1,33 @@ +- name: install, migrate data and configure dockerized calibre + hosts: alma + become: true + + tasks: + - name: create calibre directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: "0755" + loop: + - /opt/calibre-web + - /opt/calibre-web/config + + - name: synchronize backed up config data + ansible.builtin.synchronize: + src: ../calibre/data/ + dest: /opt/calibre-web/config + recursive: yes + + - name: copy compose file + ansible.builtin.copy: + src: ../calibre/calibre-docker-file.yml + dest: /opt/calibre-web/calibre-docker-file.yml + mode: "0644" + + - name: pull from personally defined calibre compose file + ansible.builtin.command: + cmd: docker compose -f /opt/calibre-web/calibre-docker-file.yml pull + + - name: start calibre + ansible.builtin.command: + cmd: docker compose -f /opt/calibre-web/calibre-docker-file.yml up -d