51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
---
|
|
- name: create shinobi user
|
|
become: true
|
|
user:
|
|
name: "{{ motion_user }}"
|
|
shell: /bin/nologin
|
|
tags: motion
|
|
|
|
- name: mount shinob videos folder
|
|
become: true
|
|
file:
|
|
path: /mnt/shinobi
|
|
state: directory
|
|
owner: "{{ motion_user }}"
|
|
group: "{{ motion_user }}"
|
|
mode: 0755
|
|
tags: motion
|
|
|
|
- name: mount smb via cifs
|
|
become: true
|
|
mount:
|
|
path: /mnt/shinobi
|
|
src: "//{{ motion_hostname }}/share/GardenCamera"
|
|
fstype: cifs
|
|
# yamllint disable-line rule:line-length
|
|
opts: "username={{ motion_user }},password={{ motion_pass }},workgroup=workgroup,iocharset=utf8,uid={{ motion_user }},gid={{ motion_user }}"
|
|
state: mounted
|
|
tags: motion
|
|
|
|
- name: create shinobi data volume
|
|
become: true
|
|
docker_volume:
|
|
name: shinobi_data
|
|
tags: motion
|
|
|
|
- name: create shinobi server container
|
|
diff: false
|
|
docker_container:
|
|
name: shinobi
|
|
image: migoller/shinobidocker:latest
|
|
recreate: true
|
|
restart: true
|
|
restart_policy: on-failure
|
|
restart_retries: 3
|
|
volumes:
|
|
- "shinobi_data:/var/lib/mysql"
|
|
- "/mnt/shinobi:/opt/shinobi/videos"
|
|
ports:
|
|
- "8085:8080"
|
|
tags: motion
|