36 lines
869 B
YAML
36 lines
869 B
YAML
- name: Create Jellyfin directory
|
|
ansible.builtin.file:
|
|
path: "{{ jellyfin_root }}"
|
|
state: directory
|
|
mode: 0500
|
|
|
|
- name: Get user jellyfin uid
|
|
ansible.builtin.getent:
|
|
database: passwd
|
|
key: jellyfin
|
|
|
|
- name: Get user jellyfin gid
|
|
ansible.builtin.getent:
|
|
database: group
|
|
key: jellyfin
|
|
|
|
- name: Install Jellyfin's docker-compose file
|
|
ansible.builtin.template:
|
|
src: docker-compose.yml.j2
|
|
dest: "{{ jellyfin_root }}/docker-compose.yml"
|
|
mode: 0400
|
|
notify: restart_jellyfin
|
|
|
|
- name: Install Jellyfin's docker-compose variables
|
|
ansible.builtin.template:
|
|
src: compose-env.j2
|
|
dest: "{{ jellyfin_root }}/.env"
|
|
mode: 0400
|
|
notify: restart_jellyfin
|
|
|
|
- name: Start and enable Jellyfin service
|
|
ansible.builtin.service:
|
|
name: "{{ docker_compose_service }}@{{ jellyfin_name }}"
|
|
state: started
|
|
enabled: true
|