switch back to version symlink (#1)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Robert Kaussow <mail@geeklabor.de> Reviewed-on: #1 Co-authored-by: Robert Kaussow <xoxys@rknet.org> Co-committed-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
parent
8f2299b314
commit
905d9899cc
@ -8,7 +8,7 @@
|
|||||||
mode: 0750
|
mode: 0750
|
||||||
loop:
|
loop:
|
||||||
- "{{ jellyfin_base_dir }}"
|
- "{{ jellyfin_base_dir }}"
|
||||||
- "{{ jellyfin_src_dir }}"
|
- "{{ jellyfin_src_dir }}/{{ jellyfin_version }}"
|
||||||
- "{{ jellyfin_conf_dir }}"
|
- "{{ jellyfin_conf_dir }}"
|
||||||
- "{{ jellyfin_data_dir }}"
|
- "{{ jellyfin_data_dir }}"
|
||||||
- "{{ jellyfin_log_dir }}"
|
- "{{ jellyfin_log_dir }}"
|
||||||
@ -16,31 +16,26 @@
|
|||||||
become: True
|
become: True
|
||||||
become_user: root
|
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:
|
- block:
|
||||||
- name: Install Jellyfin server
|
- name: Install Jellyfin server
|
||||||
unarchive:
|
unarchive:
|
||||||
src: https://repo.jellyfin.org/releases/server/portable/versions/stable/combined/{{ jellyfin_version }}/jellyfin_{{ jellyfin_version }}.tar.gz
|
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:
|
extra_opts:
|
||||||
- --strip-components=2
|
- --strip-components=2
|
||||||
remote_src: yes
|
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: True
|
||||||
become_user: "{{ jellyfin_user }}"
|
become_user: "{{ jellyfin_user }}"
|
||||||
when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=")
|
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
|
PermissionsStartOnly=true
|
||||||
EnvironmentFile={{ __jellyfin_sysconfig }}
|
EnvironmentFile={{ __jellyfin_sysconfig }}
|
||||||
ExecStart={{ jellyfin_src_dir }}/jellyfin --service
|
ExecStart={{ jellyfin_base_dir }}/jellyfin-latest --service
|
||||||
|
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
|
Loading…
Reference in New Issue
Block a user