mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 06:26:39 +00:00
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:
25
zsh/python.zsh
Normal file
25
zsh/python.zsh
Normal 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"
|
||||
Reference in New Issue
Block a user