diff --git a/roles/unifi/tasks/main.yml b/roles/unifi/tasks/main.yml new file mode 100644 index 0000000..7c139b5 --- /dev/null +++ b/roles/unifi/tasks/main.yml @@ -0,0 +1,24 @@ +--- + +- name: Create data directories + file: + path: /var/lib/unifi + state: directory + +- name: Run unifi container + docker_container: + name: unifi + image: jacobalberty/unifi:stable + env: + RUNAS_UID0: "false" + TZ: "Europe/Berlin" + init: yes + ports: + - "8080:8080" + - "8443:8443" + - "3478:3478/udp" + - "10001:10001/udp" + restart_policy: unless-stopped + state: started + volumes: + - "/var/lib/unifi:/unifi" diff --git a/site.yml b/site.yml index 7c282eb..b508afa 100644 --- a/site.yml +++ b/site.yml @@ -42,6 +42,11 @@ roles: - docker +- name: Setup unifi server + hosts: unifi.ffrgb + roles: + - unifi + - name: Setup tile server hosts: tiles.ffrgb roles: