38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
- block:
|
|
- name: Create local facts dir
|
|
file:
|
|
path: /etc/ansible/facts.d
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Set current jellyfin version
|
|
set_fact:
|
|
jellyfin_current_version: "{{ (ansible_local.jellyfin | default (dict(version='0.0.0')))['version'] }}"
|
|
|
|
- debug:
|
|
msg: Current version is '{{ jellyfin_current_version }}'
|
|
|
|
- name: Create group '{{ jellyfin_group }}'
|
|
group:
|
|
name: "{{ jellyfin_group }}"
|
|
state: present
|
|
gid: "{{ jellyfin_gid | default(omit) }}"
|
|
|
|
- name: Create user '{{ jellyfin_user }}'
|
|
user:
|
|
comment: jellyfin
|
|
name: "{{ jellyfin_user }}"
|
|
home: "{{ jellyfin_user_home }}"
|
|
uid: "{{ jellyfin_uid | default(omit) }}"
|
|
group: "{{ jellyfin_group }}"
|
|
groups: "{{ jellyfin_extra_groups | join(',') }}"
|
|
|
|
- name: Install dependencies
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop: "{{ __jellyfin_dependencies }}"
|
|
become: True
|
|
become_user: root
|