added audiobookstack role

This commit is contained in:
2023-03-28 22:41:20 +02:00
parent 23aa365c07
commit c13d930a26
4 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
---
- name: Create Audiobookshelf directories if it does not exist
become: false
ansible.builtin.file:
path: /home/{{ user['name'] }}/docker/audiobookshelf/{{ item }}
state: directory
mode: '0755'
loop: '{{ audiobookshelf_folder }}'
- name: Create docker network 'proxy'
community.docker.docker_network:
name: proxy
- name: Create Audiobookshelf Container
community.docker.docker_container:
name: audiobookshelf
image: 'ghcr.io/advplyr/audiobookshelf:latest'
pull: yes
state: started
restart_policy: unless-stopped
ports:
- '11002:80'
env:
volumes:
- /home/{{ user['name'] }}/docker/audiobookshelf/data/audiobooks:/audiobooks
- /home/{{ user['name'] }}/docker/audiobookshelf/data/podcasts:/podcasts
- /home/{{ user['name'] }}/docker/audiobookshelf/config:/config
- /home/{{ user['name'] }}/docker/audiobookshelf/metadata:/metadata
networks:
- name: proxy

View File