Reload systemd services when they get updated

Fixes #69 (Github Issue)
This commit is contained in:
Slavi Pantaleev
2019-03-03 11:55:15 +02:00
parent 041a1947b3
commit 45618679f5
12 changed files with 139 additions and 2 deletions

View File

@ -44,8 +44,14 @@
src: "{{ role_path }}/templates/ext/mautrix-telegram/systemd/matrix-mautrix-telegram.service.j2"
dest: "/etc/systemd/system/matrix-mautrix-telegram.service"
mode: 0644
register: matrix_mautrix_telegram_systemd_service_result
when: "matrix_mautrix_telegram_enabled"
- name: Ensure systemd reloaded after matrix-mautrix-telegram.service installation
service:
daemon_reload: yes
when: "matrix_mautrix_telegram_enabled and matrix_mautrix_telegram_systemd_service_result.changed"
- name: Check if a mautrix-telegram registration file exists
stat:
path: "{{ matrix_mautrix_telegram_base_path }}/registration.yaml"