From bf3068fdfa1e31c79ddf7f63f2757bf6c69c1430 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Fri, 17 Mar 2023 15:48:59 +0200 Subject: [PATCH] add system config --- tasks/configure.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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