mash-playbook
mash-playbook copied to clipboard
Add support for Frigate
This PR adds initial support for the Frigate network video recorder https://github.com/blakeblackshear/frigate
Thanks for contributing support for Frigate!
Here's some feedback:
- it'd be nice to add a documentation page
- it'd be nice to expose it through Traefik like all other services. When done,
frigate_container_http_host_bind_port
should be unset. Traefik can also be used in local-only mode and without SSL certificates, so it shouldn't be preventing anyone from using Frigate in a local-only environment. - environment variables are defined inline in the systemd service file. It's better to use an
env
file which is passed via--env-file
. See an example here. This has 4 benefits:- systemd will not need to be reloaded when the environment variables change (the playbook reloads it automatically anyway, so it's not that big of a deal)
- any sensitive data in environment variables would not be visible from every user the machine doing
ps aux
- the systemd service file will be cleaner
- adding a variable for extending the
env
file will be possible and easy
- in
tasks/install.yml
, it's better to keep related actions close to one another. The file currently starts with creating a Docker network, then does a bunch of file-related stuff, then goes back to pulling Docker images. Most roles do all Docker-related operations at the bottom of the file. -
defaults/main.yml
mixes capitalization for booleans. It sometimes usesfalse
, other times `False. It's better and more consisent with the rest of the playbook by using lowercase everywhere
Thanks @spantaleev! It's great to get feedback from the expert.
The latest commits address most of your comments. The big to-do item that remains is to add support for Traefik.