After moving my Unifi controller to a new VM, I kept updating its version. Recently, Ubiquiti release a new version (9.0.108 at the moment of writing), which has a bunch of changes. The ones I am concerned with are:

  1. The name is changed from unifi-controller to unifi-network-application
  2. The mongodb instance is no longer included in the package, but is external.

I've created an ansible role and updated it to the new application version:

ansible-galaxy role install laurivan.unifi_controller

It's deploying a docker-based installation, with its own mongodb. The variables are (as usual) in the defaults file. Main features are:

  1. You can enable/disable local mongodb (if you have a common mongodb setup),
  2. You can set the directories where the container data is created and
  3. You can enable the optional ports.

Feel free to contact me over twitter for example if you have any ideas on how to improve it!

Acknowledgements:

HTH,