This commit is contained in:
parent
01d421ede8
commit
4a6edebee8
@ -43,6 +43,12 @@
|
|||||||
become_user: "{{ jellyfin_user }}"
|
become_user: "{{ jellyfin_user }}"
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
- name: Write current version to custom fact
|
||||||
|
template:
|
||||||
|
src: etc/ansible/facts.d/jellyfin.fact.j2
|
||||||
|
dest: /etc/ansible/facts.d/jellyfin.fact
|
||||||
|
when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=")
|
||||||
|
|
||||||
- name: Copy systemd unit file
|
- name: Copy systemd unit file
|
||||||
template:
|
template:
|
||||||
src: "etc/systemd/system/jellyfin.service.j2"
|
src: "etc/systemd/system/jellyfin.service.j2"
|
||||||
|
@ -1,5 +1,17 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
|
- name: Create local facts dir
|
||||||
|
file:
|
||||||
|
path: /etc/ansible/facts.d
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- 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 }}'
|
- name: Create group '{{ jellyfin_group }}'
|
||||||
group:
|
group:
|
||||||
name: "{{ jellyfin_group }}"
|
name: "{{ jellyfin_group }}"
|
||||||
|
4
templates/etc/ansible/facts.d/openhab.fact.j2
Normal file
4
templates/etc/ansible/facts.d/openhab.fact.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"comment" : "{{ ansible_managed }}",
|
||||||
|
"version" : "{{ jellyfin_version }}"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user