- Ensure Apple’s command line tools are installed (
xcode-select --installto launch the installer).
- Install Ansible (or simply see below instructions)
The preferred way to install ansible on a Mac is via pip.
Ansible can be installed via “pip”, the Python package manager. If ‘pip’ isn’t already available in your version of Python, you can get pip by:
$ sudo easy_install pip
Then install Ansible with pip:
$ sudo pip install ansible
Or if you are looking for the latest development version:
pip install git+https://github.com/ansible/ansible.git@devel
If you are installing on OS X Mavericks, you may encounter some noise from your compiler. A workaround is to do the following:
$ sudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install ansible
Readers that use virtualenv can also install Ansible under virtualenv, though we’d recommend to not worry about it and just install Ansible globally. Do not use easy_install to install ansible directly.
- Clone repository (git clone https://github.com/masoncloud/mac-dev-playbook.git) to your local drive.
$ ansible-galaxy install -r requirements.ymlinside this directory to install required Ansible roles.
ansible-playbook main.yml -i inventory -Kinside this directory. Enter your account password when prompted.