mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 08:26:42 +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:
2
Brewfile
2
Brewfile
@@ -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'
|
||||||
|
|||||||
@@ -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
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"
|
||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user