34 lines
978 B
YAML
34 lines
978 B
YAML
- 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
|