Install Ansible via pip instead of Homebrew

When installed via Homebrew, it seemed not possible to make molecule
work correctly. So instead we install both ansible and molecule via pip,
and everything works.
This commit is contained in:
2019-12-27 22:33:12 +00:00
parent e97ab272ec
commit e7ef71b49a
4 changed files with 26 additions and 6 deletions

25
zsh/python.zsh Normal file
View File

@@ -0,0 +1,25 @@
#
# Python environment setup
#
install_python_global_packages () {
local packages=(
'ansible'
'molecule[docker]'
)
if (( $+commands[brew] )); then
brew list python >/dev/null || brew install python
fi
local pipcmd="pip"
if (( $+commands[pip3] )); then; pipcmd="pip3"; fi
$pipcmd install --upgrade setuptools
$pipcmd install --upgrade "${packages[@]}"
}
# Aliases
alias ap="ansible-playbook"
alias av="ansible-vault"
alias mo="molecule"