Merge remote-tracking branch 'max/unifi-controller'

Link: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/16
This commit is contained in:
Alexander Dahl 2022-01-29 08:47:06 +01:00
commit dee4f2557e
Signed by untrusted user: alex
GPG key ID: 34ADCD0072215CC6

View file

@ -1,11 +1,32 @@
---
# this is for a dedicated vm just hosting the unifi controller.
- hosts: unicorn.n39.eu
become: true
vars:
ansible_python_interpreter: /usr/bin/python3
roles:
- role: docker_setup
vars:
docker_data_root: "/srv/docker"
tasks:
- name: Setup the docker container for unifi-controller
docker_container:
name: unifi-controller
image: "jacobalberty/unifi:v6.5.55"
state: started
restart_policy: unless-stopped
container_default_behavior: no_defaults
env:
TZ: "Europe/Berlin"
# These fixed ports are needed.
# https://help.ui.com/hc/en-us/articles/218506997-UniFi-Ports-Used
ports:
- "8080:8080/tcp" # Device command/control
- "8443:8443/tcp" # Web interface + API
- "8843:8843/tcp" # HTTPS portal
- "8880:8880/tcp" # HTTP portal
- "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"