xoxys.jellyfin/tasks/prepare.yml
Robert Kaussow c14dc72a59
All checks were successful
continuous-integration/drone/push Build is passing
fix facts dir
2019-02-02 00:41:22 +01:00

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