271a596004
Added wireguard config Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
44 lines
880 B
YAML
44 lines
880 B
YAML
---
|
|
- name: Create zonminder user
|
|
user:
|
|
name: zm
|
|
uid: 911
|
|
shell: /bin/false
|
|
become: true
|
|
|
|
- name: Create Zoneminder config directory
|
|
file:
|
|
path: "{{ item }}"
|
|
owner: 911
|
|
mode: '700'
|
|
state: directory
|
|
loop:
|
|
- "{{ zoneminder_config }}"
|
|
become: true
|
|
|
|
- name: Create Zoneminder data directory
|
|
file:
|
|
path: "{{ item }}"
|
|
owner: 911
|
|
mode: '766'
|
|
state: directory
|
|
loop:
|
|
- "{{ zoneminder_data }}"
|
|
become: true
|
|
|
|
# Todo, check if docker compose is running
|
|
# - name: Shut down docker
|
|
# shell:
|
|
# cmd: "docker compose down --remove-orphans"
|
|
# chdir: "{{ docker_compose_dir }}"
|
|
|
|
- name: Copy the compose file
|
|
template:
|
|
src: templates/aya01/compose.yaml
|
|
dest: "{{ docker_compose_dir }}/compose.yaml"
|
|
|
|
- name: Run docker compose
|
|
shell:
|
|
cmd: "docker compose up -d"
|
|
chdir: "{{ docker_compose_dir }}"
|