Up until now if you tried to have JAMF or an MDM install homebrew it would fail. This is caused by the MDM running as root or without tty present.
sudo: no tty present and no askpass program specified
Thanks to Honestpuck on Github there is now a script available. You can now deploy the script using your MDM or with DEPNotify or Splashbuddy.