xoxys.jellyfin/tasks/prepare.yml

38 lines
1.0 KiB
YAML
Raw Normal View History

2019-02-01 20:30:07 +00:00
---
- block:
2019-02-01 23:04:06 +00:00
- name: Create local facts dir
file:
path: /etc/ansible/facts.d
state: directory
2019-02-01 23:32:40 +00:00
mode: 0750
2019-02-01 23:04:06 +00:00
- 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 }}'
2019-02-01 20:30:07 +00:00
- 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(',') }}"
2019-02-01 22:38:51 +00:00
- name: Install dependencies
package:
name: "{{ item }}"
state: present
loop: "{{ jellyfin_dependencies }}"
2019-02-01 20:30:07 +00:00
become: True
become_user: root