diff --git a/tasks/configure.yml b/tasks/configure.yml index 2914082..38ab367 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -143,3 +143,27 @@ src: templates/motion_hass.conf.j2 dest: /etc/motion_hass.conf backup: yes + + - name: Deploy service unit for HomeAssistant integration + copy: + src: files/motion_hass.service + dest: /etc/systemd/system/motion_hass.service + notify: Reload systemd + + - name: Deploy timer unit for HomeAssistant integration + copy: + src: files/motion_hass.timer + dest: /etc/systemd/system/motion_hass.timer + notify: Reload systemd + + - name: Enable service unit for HomeAssistant integration + systemd: + daemon_reload: true + name: motion_hass.service + enabled: true + + - name: Enable timer unit for HomeAssistant integration + systemd: + daemon_reload: true + name: motion_hass.timer + enabled: true