36 lines
975 B
YAML
36 lines
975 B
YAML
---
|
|
- name: "set local variables from overrides and defaults"
|
|
set_fact:
|
|
jellyfin: "{{ (jellyfin_defaults | combine(jellyfin_override, recursive=True)) if jellyfin_override else jellyfin_defaults }}"
|
|
|
|
- name: ensure that path exists
|
|
file:
|
|
path: "{{ path }}/config/jellyfin"
|
|
state: directory
|
|
|
|
- name: template compose
|
|
template:
|
|
src: compose.yml.j2
|
|
dest: "{{ path }}/compose.yml"
|
|
|
|
- import_role:
|
|
name: storage_mount
|
|
vars:
|
|
storagebox_override:
|
|
host: "{{ jellyfin.networkmount.host }}"
|
|
host_path: "{{ jellyfin.networkmount.host_path }}"
|
|
args: "{{ jellyfin.networkmount.args }}"
|
|
dest_path: "{{ jellyfin.data_path }}"
|
|
when: jellyfin.networkmount.host | length > 1
|
|
|
|
|
|
- name: ensure containers are running
|
|
community.docker.docker_compose_v2:
|
|
project_src: "{{ path }}"
|
|
project_name: "{{ role_name }}"
|
|
state: "present"
|
|
pull: "always"
|
|
wait: true
|
|
services: [ 'jellyfin' ]
|
|
register: _compose_result
|