I started out trying to use Ansible via Home Brew, but I needed to add a pip library (docker-py) and read that even Brew’s ansible uses the systems python. So I removed python and ansible completely from brew.
I then tried to install Ansible via the system pip. Now I get ‘bad interpreter’ errors:
› brew list
ack brew-cask git-annex jq macvim pcre sysdig watch
ant cmake gmp jruby md5sha1sum pkg-config the_silver_searcher wget
apple-gcc42 cscope gnupg jsonpp nettle readline tig xmlstarlet
autojump curl gnutls libevent node reattach-to-user-namespace tmux xz
bash gdbm go libidn openssl rlwrap tree zsh-completions
bash-completion gettext grc libtasn1 panamax scala vimpager zsh-history-substring-search
bison git gsasl libyaml pandoc sqlite wakeonlan zsh-syntax-highlighting
in ansible/centos/
› which python
/usr/bin/python
in ansible/centos/
› which ansible
/usr/local/bin/ansible
in ansible/centos/
› ls -lh /usr/local/bin/ansible
-rwxr-xr-x 1 root admin 7.9K Sep 3 21:39 /usr/local/bin/ansible
in ansible/centos/
› ls -lh /usr/local/bin/ansible-playbook
-rwxr-xr-x 1 root admin 12K Sep 3 21:39 /usr/local/bin/ansible-playbook
in ansible/centos/
› ansible-playbook
zsh: /usr/local/bin/ansible-playbook: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
in ansible/centos/
› ansible
zsh: /usr/local/bin/ansible: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
Any tips to either rescue my system install or make Brew’s Ansible use Brew’s pip library would be greatly appreciated.