# vim: ft=yaml.ansible
---
- name: Create Emby volume directories
ansible.builtin.file:
name: "{{ dir }}"
owner: '1000'
mode: u=rwx,g=rx,o=rx
state: directory
loop:
- "{{ services.emby.volume }}/programdata"
- "{{ services.emby.data_volume }}/tvshows"
- "{{ services.emby.data_volume }}/movies"
loop_control:
loop_var: dir
- name: Deploy Emby Docker container
community.docker.docker_container:
name: emby
state: "{{ 'absent' if down is defined and down else 'started' }}"
restart: "{{ restart is defined and restart }}"
recreate: "{{ recreate is defined and recreate }}"
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.data_volume }}/tvshows:/mnt/share1:rw"
- "{{ services.emby.data_volume }}/movies:/mnt/share2:rw"
devices:
- /dev/vchiq:/dev/vchiq # MMAL/OMX on Raspberry Pi