Update 3 files

- /roles/audiobookshelf/tasks/main.yml
- /roles/audiobookshelf/templates/docker-compose.yml.j2
- /olimp-deploy.yml
This commit is contained in:
Administrator 2025-10-16 12:42:10 +00:00
parent d61543aab3
commit 5e022e9b65
3 changed files with 52 additions and 0 deletions

View File

@ -19,6 +19,7 @@
roles:
- { role: docker, tags: deploy_docker }
- { role: ampache, tags: deploy_ampache }
- { role: audiobookshelf, tags: deploy_audiobookshelf }
- hosts: talk
roles:

View File

@ -0,0 +1,36 @@
---
- 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

View File

@ -0,0 +1,15 @@
version: '3.8'
services:
audiobookshelf:
image: ghcr.io/advplyr/audiobookshelf:latest
container_name: audiobookshelf
restart: unless-stopped
ports:
- "{{ audiobookshelf_port }}:80"
volumes:
- "{{ audiobookshelf_config_dir }}:/config"
- "{{ audiobookshelf_db_dir }}:/metadata"
- /mnt/abooks:/audiobooks
environment:
- TZ={{ timezone }}