Osx Install Ansible

  

Ansible is mainly used for automize Linux/windows servers provisioning and operation, however from version 2.1 there is support module for network related devices.

In order to test it I have first install ansible in my mac:

There are several ways to install ansible, but the mostly common used on mac is homebrew an pip. Here is the comparision of both installation ways:

Ansible

Installing Ansible on macOS The preferred way to install Ansible on a Mac is with pip. The instructions can be found in Installing and upgrading Ansible with pip. If you are running macOS version 10.12 or older, then you should upgrade to the latest pip to connect to the Python Package Index securely. First install Xcode if not installed on your macOS: xcode-select -install. Then all you have to do is type the following commands: sudo easyinstall pip. Sudo pip install ansible -quiet. Then, we can upgrade Ansible when a new version released by typing the following command: sudo pip install ansible -upgrade.

Osx install ansible

'pip is a packager for the python world – you should only ever be able to install python-things with it; homebrew is a package manager targetted at OSX; it doesn’t impose any restrictions onto what software you can install with it – since python is a subset of software.

installing things with brew will install them into /usr/local/;

Os x install ansible download

installing things with pip will fetch packages from the Python Package Index, and it will install them in a place where your python interpreter will find them: either into your home directory (e.g. ~/.local/lib/python2.7/site-packages/) or in some global search-path of your python interpreter (e.g. /usr/local/lib/python2.7/dist-packages/)”

We will just explore the way to install ansible with homebrew:

Osx install ansible-galaxy

1, install Xcode (C compiler) in order to use python
xcode-select–install

2, Install python using homebrew

brew install python

or

brew install python3

Actually, step 1 and 2 can be skipped because all new Mac OS X has python 2.7 installed already.

3, brew install ansible

After the installation we can find ansible is installed under /usr/local/bin/

mac-c02t6npagtfj:bin grayin$ ls ansible*

Osx Install Ansible Free

ansible ansible-doc ansible-pull

Mac Install Ansible 2.10

Os x install ansible software

Osx Install On Pc

ansible-config ansible-galaxy ansible-vault

ansible-connection ansible-inventory

ansible-console ansible-playbook

notes: do “brew update” first before the installation to avoid any unexpected errors