Finish motion setup

This commit is contained in:
Daniel A. Maierhofer
2018-07-13 21:31:22 +02:00
parent 3981781119
commit 2f431e3e82
6 changed files with 261 additions and 2 deletions

View File

@@ -1,4 +1,49 @@
---
- name: motion - install motion
package: name=motion
- name: motion - install motion
package: name=motion
#- name: motion - /etc/default/motion
# replace:
# path: /etc/default/motion
# regexp: "^start_motion_daemon=.*"
# replace: "start_motion_daemon=yes"
# notify: restart motion
- name: motion - install motioneye packages
package: "name={{ item }}"
with_items:
- python-pip
- python-dev
- python-setuptools
- curl
- libssl-dev
- libcurl4-openssl-dev
- libjpeg-dev
- libz-dev
- ffmpeg
- v4l-utils
- name: motion - install motioneye
pip: name=motioneye state=latest executable=pip
notify: restart motioneye
- name: motion - setup storage
file: "path={{ item }} owner=motion group=adm mode=755 state=directory"
with_items:
- /var/lib/motioneye/
- /var/log/motioneye/
- /var/run/motioneye/
- /etc/motioneye/
- name: motion - configure motioneye
copy: "src={{ item }} dest=/etc/motioneye/{{ item }} owner=motion group=adm mode=0644"
with_items:
- motion.conf
- motioneye.conf
- thread-1.conf
notify: restart motioneye
- name: motion - copy service file
copy: src=motioneye.service dest=/etc/systemd/system/motioneye.service
notify: restart motioneye