Add playbooks/calibre.yml
This commit is contained in:
33
playbooks/calibre.yml
Normal file
33
playbooks/calibre.yml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user