CU-1newj99 Added motion camera deployment to home server

This commit is contained in:
Bastian de Byl
2021-10-02 17:01:42 -04:00
parent 6f9d074241
commit 265f3b859e
9 changed files with 224 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
---
- name: install motion
become: true
pacman:
name: "{{ deps }}"
state: present
tags: deps

View File

@@ -0,0 +1,3 @@
---
- import_tasks: deps.yml
- import_tasks: motion.yml

View File

@@ -0,0 +1,26 @@
---
- name: create motion directory
become: true
file:
path: "{{ motion_target_dir }}"
state: directory
owner: "{{ nfs_user }}"
group: "{{ nfs_group }}"
mode: 0755
- name: template motion config
become: true
template:
src: templates/motion.conf.j2
dest: /etc/motion/motion.conf
mode: 0644
backup: true
notify:
- restart_motion
- name: enable (now) motion.service
become: true
service:
name: motion.service
state: started
enabled: true