This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
pi-ansible/roles/docker_services/tasks/services/emby.yml
2023-04-21 00:29:19 +02:00

36 lines
990 B
YAML

# vim: ft=yaml.ansible
---
- name: Create Emby volume directories
ansible.builtin.file:
name: "{{ services.emby.volume }}/{{ dir }}"
owner: "{{ ansible_user }}"
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- programdata
- tvshows
- movies
loop_control:
loop_var: dir
- name: Deploy Emby Docker container
community.docker.docker_container:
name: emby_app
state: "{{ 'absent' if stop is defined and stop else 'started' }}"
restart: "{{ stop is undefined or not stop }}"
image: emby/embyserver_arm64v8:{{ services.emby.version }}
restart_policy: always
env:
UID: '1000'
GID: '1000'
networks:
- name: services
aliases:
- emby
volumes:
- "{{ services.emby.volume }}/programdata:/config:rw"
- "{{ services.emby.volume }}/tvshows:/mnt/share1:rw"
- "{{ services.emby.volume }}/movies:/mnt/share2:rw"
devices:
- /dev/vchiq:/dev/vchiq # MMAL/OMX on Raspberry Pi