Currently Ansible can be run from any machine with Python 2 (versions 2.6 or 2.7) or Python 3 (versions 3.5 and higher) installed (Windows isn’t supported for the control machine).
The preferred way to install ansible on a Mac is via pip.
$ python --version
Python 2.7.10
$ sudo easy_install pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
Best match: pip 9.0.1
Downloading https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9
Processing pip-9.0.1.tar.gz
Writing /tmp/easy_install-wH3bmq/pip-9.0.1/setup.cfg
Running pip-9.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wH3bmq/pip-9.0.1/egg-dist-tmp-7LyPKz
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
warnings.warn(msg)
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.landscape.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'appveyor.yml'
no previously-included directories found matching '.github'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
Adding pip 9.0.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin
Installed /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
$ sudo pip install ansible
The directory '/Users/tech-dev/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/tech-dev/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ansible
Downloading ansible-2.4.0.0.tar.gz (6.6MB)
100% |████████████████████████████████| 6.6MB 175kB/s
Collecting jinja2 (from ansible)
Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
100% |████████████████████████████████| 348kB 4.1MB/s
Collecting PyYAML (from ansible)
Downloading PyYAML-3.12.tar.gz (253kB)
100% |████████████████████████████████| 256kB 2.2MB/s
Collecting paramiko (from ansible)
Downloading paramiko-2.3.1-py2.py3-none-any.whl (182kB)
100% |████████████████████████████████| 184kB 2.1MB/s
Collecting cryptography (from ansible)
Downloading cryptography-2.1.1-cp27-cp27m-macosx_10_6_intel.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 784kB/s
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from ansible)
Collecting MarkupSafe>=0.23 (from jinja2->ansible)
Downloading MarkupSafe-1.0.tar.gz
Collecting pynacl>=1.0.1 (from paramiko->ansible)
Downloading PyNaCl-1.1.2-cp27-cp27m-macosx_10_6_intel.whl (178kB)
100% |████████████████████████████████| 184kB 5.6MB/s
Collecting bcrypt>=3.1.3 (from paramiko->ansible)
Downloading bcrypt-3.1.4-cp27-cp27m-macosx_10_6_intel.whl (51kB)
100% |████████████████████████████████| 61kB 8.2MB/s
Collecting pyasn1>=0.1.7 (from paramiko->ansible)
Downloading pyasn1-0.3.7-py2.py3-none-any.whl (63kB)
100% |████████████████████████████████| 71kB 4.6MB/s
Collecting idna>=2.1 (from cryptography->ansible)
Downloading idna-2.6-py2.py3-none-any.whl (56kB)
100% |████████████████████████████████| 61kB 6.9MB/s
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->ansible)
Downloading cffi-1.11.2-cp27-cp27m-macosx_10_6_intel.whl (238kB)
100% |████████████████████████████████| 245kB 4.7MB/s
Collecting enum34; python_version < "3" (from cryptography->ansible)
Downloading enum34-1.1.6-py2-none-any.whl
Requirement already satisfied: six>=1.4.1 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from cryptography->ansible)
Collecting asn1crypto>=0.21.0 (from cryptography->ansible)
Downloading asn1crypto-0.23.0-py2.py3-none-any.whl (99kB)
100% |████████████████████████████████| 102kB 5.0MB/s
Collecting ipaddress; python_version < "3" (from cryptography->ansible)
Downloading ipaddress-1.0.18-py2-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->ansible)
Downloading pycparser-2.18.tar.gz (245kB)
100% |████████████████████████████████| 256kB 4.5MB/s
Installing collected packages: MarkupSafe, jinja2, PyYAML, pycparser, cffi, pynacl, idna, enum34, asn1crypto, ipaddress, cryptography, bcrypt, pyasn1, paramiko, ansible
Running setup.py install for MarkupSafe ... done
Running setup.py install for PyYAML ... done
Running setup.py install for pycparser ... done
Running setup.py install for ansible ... done
Successfully installed MarkupSafe-1.0 PyYAML-3.12 ansible-2.4.0.0 asn1crypto-0.23.0 bcrypt-3.1.4 cffi-1.11.2 cryptography-2.1.1 enum34-1.1.6 idna-2.6 ipaddress-1.0.18 jinja2-2.9.6 paramiko-2.3.1 pyasn1-0.3.7 pycparser-2.18 pynacl-1.1.2
sudo pip install boto
Password:
The directory '/Users/uedatomohiko/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/uedatomohiko/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting boto
Downloading boto-2.48.0-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 402kB/s
Installing collected packages: boto
Successfully installed boto-2.48.0