ansible-nas icon indicating copy to clipboard operation
ansible-nas copied to clipboard

Add UniFi Network Application stack

Open GeriYatola opened this issue 3 years ago • 2 comments

What this PR does / why we need it:

This adds UniFi Network Application stack to Ansible-NAS. This is a valuable addition to any owners of Ubiquiti UniFi products, since it completely replaces a separate UniFi Cloud Key or manually deploying the Network Application stack.

Any other useful info:

The unifi-docker container is provided by Jacob Alberty, and the stack is based on their Docker Compose example. We define a separate network (unifi) for the stack to assert the default ports can always be used.

We run our Ansible-NAS on UTC timezone, but prefer having UniFi controller on the local TZ. That's why the TZ for the UniFi container can be overwritten with unifi_timezone

GeriYatola avatar Dec 26 '21 22:12 GeriYatola

Thanks for the contribution!

Few comments:

  • Variables seem to be mixed up between group_vars/all.yml and roles/unifi/defaults/all.yml, some of which are also repeated. Please can you move all the vars into the role.
  • Running as the unifi user is optional, but adds a lot of extra complexity (and weirdness on Ubuntu ref systemd-coredump user) - please can you remove the user: stanza on the docker_container definition which will run the container as root. This also follows the standard of all the other containers in Ansible-NAS. There will be some other cleanup required because of this.

Aside from these minor points - good to merge!

davestephens avatar Feb 12 '22 15:02 davestephens

@GeriYatola - not sure if it's useful at all, but I attempted to get this added about two years ago. It's out of date, but you can look at https://github.com/davestephens/ansible-nas/pull/308 for any possible useful information. It worked fine at the time even though it never got commented on/reviewed/merged. :-( I've since switched to a UDMPRO and don't care any more. :-)

bcurran3 avatar Aug 15 '22 18:08 bcurran3