Ansible can be installed on macOS using the following command if you have installed Homebrew: –
brew install ansible
If you fo not have Homebrew installed following the instructions here: https://markjesson.co.uk/2020/02/27/installing-homebrew-on-macos/ .