ansible/roles/docker/tasks/aya01_compose.yml
TuDatTr 271a596004 Changed ZM config permissions
Added wireguard config

Signed-off-by: TuDatTr <tuan-dat.tran@tudattr.dev>
2022-12-08 23:12:56 +01:00

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 }}"