macOS X package installation
Installing Ansible on the MAC OS X system can be achieved using one of two tools. The first, which uses Python PyPI, is described in the following section. The second uses the Mac OS X open source package management system Homebrew (brew.sh). In this section, we will be describing how to install Ansible using Homebrew.
To be able to use Homebrew, we first need to make sure it is installed, as it is not a default system application. You need to build it into the system using a Ruby compiler. For that, you also need to install Xcode (found here: developer.apple.com/xcode/) and accept its user license. We then run the following command on its Terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This command may take some time depending on your internet access and computer speed.
We can then use Homebrew to install Ansible:
brew install ansible