Homebrew refers to itself as the missing package manager for MacOS.
I tend to agree. I've used Homebrew for years to help install *nix utilities on OSX, and MacOS
Check out Homebrew on their homepage at brew.sh.
The installation couldn't be simpler.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Paste that into a terminal, and watch the magic happen.
Now common packages, like Ansible, can be installed by using the 'brew install' command
brew install ansible
These packages can be maintained using the 'brew upgrade' command
That's it! Homebrew is installed!