mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 03:06:40 +00:00
28 lines
523 B
Bash
28 lines
523 B
Bash
#
|
|
# Python environment setup
|
|
#
|
|
|
|
install_python_global_packages() {
|
|
local packages=(
|
|
'ansible'
|
|
'grip'
|
|
'molecule[docker]'
|
|
'yamllint'
|
|
)
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]] && command-exists brew; then
|
|
brew list python >/dev/null || brew install python
|
|
fi
|
|
|
|
local pipcmd="pip"
|
|
if command-exists 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"
|