From b554cf2da5b4a06cb6f715b17757843edd86421f Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sat, 2 Feb 2019 00:47:13 +0100 Subject: [PATCH] small fixes --- tasks/install.yml | 7 +++---- tasks/main.yml | 1 + tasks/post_tasks.yml | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 tasks/post_tasks.yml diff --git a/tasks/install.yml b/tasks/install.yml index 1d135e6..7e7394b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -31,14 +31,14 @@ mode: 0600 loop: - "logging.json" - # notify: __jellyfin_restart + notify: __jellyfin_restart - name: Link v'{{ jellyfin_version }}' to latest file: src: "{{ jellyfin_base_dir }}/{{ jellyfin_version }}/jellyfin" dest: "{{ jellyfin_base_dir }}/jellyfin-latest" state: link - # notify: __jellyfin_restart + notify: __jellyfin_restart become: True become_user: "{{ jellyfin_user }}" when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=") @@ -49,13 +49,12 @@ src: etc/ansible/facts.d/jellyfin.fact.j2 dest: /etc/ansible/facts.d/jellyfin.fact mode: 0644 - when: jellyfin_version is version(jellyfin_current_version, ">") or jellyfin_current_version is version('0.0.0', "=") - name: Copy systemd unit file template: src: "etc/systemd/system/jellyfin.service.j2" dest: "/etc/systemd/system/jellyfin.service" - # notify: __jellyfin_restart + notify: __jellyfin_restart - name: Copy logrotate config template: diff --git a/tasks/main.yml b/tasks/main.yml index a08513e..a27688c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,3 +3,4 @@ - import_tasks: storage.yml when: jellyfin_lvm_enabled - include_tasks: install.yml +- include_tasks: post_tasks.yml diff --git a/tasks/post_tasks.yml b/tasks/post_tasks.yml new file mode 100644 index 0000000..12a6bbf --- /dev/null +++ b/tasks/post_tasks.yml @@ -0,0 +1,9 @@ +--- +- name: Ensure jellyfin service is up and running + systemd: + state: started + daemon_reload: yes + enabled: yes + name: jellyfin + become: True + become_user: root