diff --git a/Brewfile b/Brewfile index ad3cc61..818d0e5 100644 --- a/Brewfile +++ b/Brewfile @@ -15,7 +15,6 @@ tap 'homebrew/cask-versions' # brew 'ack' -brew 'ansible' brew 'aspell' brew 'bash' brew 'bazaar' @@ -42,7 +41,6 @@ brew 'node' brew 'peco' brew 'pgformatter' brew 'postgresql' -brew 'pyenv' brew 'rbenv' brew 'rclone' brew 'readline' diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 9c9eed2..658cc2f 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -27,10 +27,6 @@ alias di="colordiff" alias devnullsmtp="java -jar $DOTBIN/DevNullSmtp.jar" alias open_ports="sudo lsof -i -P | grep --color=never -i \"listen\"" -# Ansible -alias ap="ansible-playbook" -alias av="ansible-vault" - # Flush DNS cache alias flush_dns="dscacheutil -flushcache" diff --git a/zsh/python.zsh b/zsh/python.zsh new file mode 100644 index 0000000..46665e8 --- /dev/null +++ b/zsh/python.zsh @@ -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" diff --git a/zshrc.zsh b/zshrc.zsh index ef7d875..8533952 100644 --- a/zshrc.zsh +++ b/zshrc.zsh @@ -124,6 +124,7 @@ source "$DOTZSH/golang.zsh" source "$DOTZSH/google-cloud.zsh" source "$DOTZSH/kubernetes.zsh" source "$DOTZSH/nodejs.zsh" +source "$DOTZSH/python.zsh" source "$DOTZSH/ruby.zsh" source "$DOTZSH/rust.zsh"