--- - 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 - thread-2.conf - thread-3.conf notify: restart motioneye - name: motion - remove logo lineinfile: dest: /usr/local/lib/python2.7/dist-packages/motioneye/templates/main.html regexp: "{{ item }}" state: absent with_items: - 'motionEye' - '