- /roles/audiobookshelf/tasks/main.yml - /roles/audiobookshelf/templates/docker-compose.yml.j2 - /olimp-deploy.yml
36 lines
897 B
YAML
36 lines
897 B
YAML
---
|
|
- name: Create Audiobookshelf directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: 0755
|
|
loop:
|
|
- "{{ audiobookshelf_base_dir }}"
|
|
- "{{ audiobookshelf_config_dir }}"
|
|
- "{{ audiobookshelf_db_dir }}"
|
|
- /mnt/abooks
|
|
- name: Deploy Audiobookshelf docker-compose.yml
|
|
template:
|
|
src: docker-compose.yml.j2
|
|
dest: "{{ audiobookshelf_base_dir }}/docker-compose.yml"
|
|
mode: 0644
|
|
|
|
- name: Start Audiobookshelf services
|
|
shell: |
|
|
cd {{ audiobookshelf_base_dir }}
|
|
docker compose up -d
|
|
args:
|
|
executable: /bin/bash
|
|
|
|
- name: Wait for services to start
|
|
pause:
|
|
seconds: 15
|
|
|
|
- name: Check Audiobookshelf container status
|
|
shell: docker ps --filter name=audiobookshelf
|
|
register: audiobookshelf_status
|
|
changed_when: false
|
|
|
|
- name: Show Audiobookshelf status
|
|
debug:
|
|
var: audiobookshelf_status.stdout |