--- # The home-server project produces a multi-purpose setup using Ansible. # Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license. # Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing. - name: create a directory for the Motion web page file: name: /srv/http/motion state: directory mode: 0750 owner: root group: http - name: send the feedback and control web page for Motion template: src: templates/index.html.j2 dest: /srv/http/motion/index.html mode: 0640 owner: root group: http - name: configure nginx for Motion copy: content: | location {{http_pfx_motion}}/ { alias /srv/http/motion/; index index.html; } location {{http_pfx_motion}}/control/ { proxy_pass http://unix:/run/shared_sockets/motion_control.socket:/; proxy_buffering off; proxy_cache off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } location {{http_pfx_motion}}/camera/ { proxy_pass http://unix:/run/shared_sockets/motion_stream.socket:/; proxy_buffering off; proxy_cache off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } dest: /etc/nginx/inc.d/motion.https.inc mode: 0440 owner: http group: http notify: - restart nginx.service ### LOCAL COMMIT ⇒ ### - name: commit local changes include_role: name=etckeeper.inc allow_duplicates=true tasks_from=local.yml vars: msg: Motion ### ⇐ LOCAL COMMIT ### - meta: flush_handlers