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

View File

@@ -15,7 +15,6 @@ tap 'homebrew/cask-versions'
# #
brew 'ack' brew 'ack'
brew 'ansible'
brew 'aspell' brew 'aspell'
brew 'bash' brew 'bash'
brew 'bazaar' brew 'bazaar'
@@ -42,7 +41,6 @@ brew 'node'
brew 'peco' brew 'peco'
brew 'pgformatter' brew 'pgformatter'
brew 'postgresql' brew 'postgresql'
brew 'pyenv'
brew 'rbenv' brew 'rbenv'
brew 'rclone' brew 'rclone'
brew 'readline' brew 'readline'

View File

@@ -27,10 +27,6 @@ alias di="colordiff"
alias devnullsmtp="java -jar $DOTBIN/DevNullSmtp.jar" alias devnullsmtp="java -jar $DOTBIN/DevNullSmtp.jar"
alias open_ports="sudo lsof -i -P | grep --color=never -i \"listen\"" alias open_ports="sudo lsof -i -P | grep --color=never -i \"listen\""
# Ansible
alias ap="ansible-playbook"
alias av="ansible-vault"
# Flush DNS cache # Flush DNS cache
alias flush_dns="dscacheutil -flushcache" alias flush_dns="dscacheutil -flushcache"

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"

View File

@@ -124,6 +124,7 @@ source "$DOTZSH/golang.zsh"
source "$DOTZSH/google-cloud.zsh" source "$DOTZSH/google-cloud.zsh"
source "$DOTZSH/kubernetes.zsh" source "$DOTZSH/kubernetes.zsh"
source "$DOTZSH/nodejs.zsh" source "$DOTZSH/nodejs.zsh"
source "$DOTZSH/python.zsh"
source "$DOTZSH/ruby.zsh" source "$DOTZSH/ruby.zsh"
source "$DOTZSH/rust.zsh" source "$DOTZSH/rust.zsh"