switch back to version symlink #1
@ -8,7 +8,7 @@
|
||||
mode: 0750
|
||||
loop:
|
||||
- "{{ jellyfin_base_dir }}"
|
||||
- "{{ jellyfin_src_dir }}"
|
||||
- "{{ jellyfin_src_dir }}/{{ jellyfin_version }}"
|
||||
- "{{ jellyfin_conf_dir }}"
|
||||
- "{{ jellyfin_data_dir }}"
|
||||
- "{{ jellyfin_log_dir }}"
|
||||
@ -16,31 +16,26 @@
|
||||
become: True
|
||||
become_user: root
|
||||
|
||||
- block:
|
||||
- name: Ensure service is stopped before upgrade
|
||||
systemd:
|
||||
state: stopped
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
name: jellyfin
|
||||
failed_when: "unused_disable is failed and ('find' not in unused_disable.msg and 'found' not in unused_disable.msg)"
|
||||
|
||||
- name: Delete current version
|
||||
file:
|
||||
path: "{{ jellyfin_src_dir }}"
|
||||
state: absent
|
||||
become: True
|
||||
become_user: root
|
||||
when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=")
|
||||
|
||||
- block:
|
||||
- name: Install Jellyfin server
|
||||
unarchive:
|
||||
src: https://repo.jellyfin.org/releases/server/portable/versions/stable/combined/{{ jellyfin_version }}/jellyfin_{{ jellyfin_version }}.tar.gz
|
||||
dest: "{{ jellyfin_src_dir }}"
|
||||
dest: "{{ jellyfin_src_dir }}/{{ jellyfin_version }}"
|
||||
extra_opts:
|
||||
- --strip-components=2
|
||||
remote_src: yes
|
||||
|
||||
- name: Link 'v{{ jellyfin_version }}' to latest
|
||||
file:
|
||||
src: "{{ jellyfin_src_dir }}/{{ jellyfin_version }}/jellyfin"
|
||||
dest: "{{ jellyfin_base_dir }}/jellyfin-latest"
|
||||
state: link
|
||||
notify: __jellyfin_restart
|
||||
|
||||
- name: Remove old version
|
||||
file:
|
||||
path: "{{ jellyfin_src_dir }}/{{ jellyfin_current_version }}"
|
||||
state: absent
|
||||
become: True
|
||||
become_user: "{{ jellyfin_user }}"
|
||||
when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=")
|
||||
|
@ -17,7 +17,7 @@ Group={{ jellyfin_group }}
|
||||
|
||||
PermissionsStartOnly=true
|
||||
EnvironmentFile={{ __jellyfin_sysconfig }}
|
||||
ExecStart={{ jellyfin_src_dir }}/jellyfin --service
|
||||
ExecStart={{ jellyfin_base_dir }}/jellyfin-latest --service
|
||||
|
||||
Restart=on-failure
|
||||
TimeoutSec=15
|
||||
|
Loading…
Reference in New Issue
Block a user