Jeff Geerling has a phenomenal ansible playbook to setup his macs:
Sure, there are edge cases I hit because I have some older machines, but for the most part, it’s awesome. I’m up and running on new Macs within a coffee break of getting terminal access.