Introduce a data_dir variable for unicorn

We've had too many confusions about the actual data directory and
unfortunately there are also inconsistencies. So use the data_dir
variable to mask host specific settings.
This commit is contained in:
Stefan Haun 2022-06-29 00:17:21 +02:00
parent 81a261deb0
commit 6ae3e52403

View file

@ -4,6 +4,7 @@
become: true
vars:
ansible_python_interpreter: /usr/bin/python3
data_dir: "/srv/data"
roles:
- role: docker_setup
vars:
@ -28,5 +29,5 @@
- "3478:3478/udp" # STUN service
- "6789:6789/tcp" # Speed Test (unifi5 only)
volumes:
- "/srv/data/unifi-controller/data:/unifi/data"
- "/srv/data/unifi-controller/log:/unifi/log"
- "{{ data_dir }}/unifi-controller/data:/unifi/data"
- "{{ data_dir }}/unifi-controller/log:/unifi/log"