From 22f2a8e3dba6be74e2be2ba6da95ebaa7ac1a544 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Wed, 17 Jun 2020 20:53:51 +0200 Subject: [PATCH] unifi: add role for unifi controller --- roles/unifi/tasks/main.yml | 24 ++++++++++++++++++++++++ site.yml | 5 +++++ 2 files changed, 29 insertions(+) create mode 100644 roles/unifi/tasks/main.yml 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: