Prefer a locally-installed ansible and ansible-playbook

This commit is contained in:
Anthony Rose 2020-04-06 10:47:35 +01:00
parent f847dd167f
commit 41be08a8cf

View file

@ -106,12 +106,12 @@ if [ ! -d "$HOME/.local/bin" ]; then
/bin/mkdir -p "$HOME/.local/bin" /bin/mkdir -p "$HOME/.local/bin"
fi fi
# Alias vi to vim if it is installed # Alias vi to vim if it is installed.
if [ -x /usr/bin/vim ] || [ -x /usr/local/bin/vim ] || [ -x /usr/pkg/bin/vim ]; then if [ -x /usr/bin/vim ] || [ -x /usr/local/bin/vim ] || [ -x /usr/pkg/bin/vim ]; then
alias vi="vim" alias vi="vim"
fi fi
# Set up GOPATH # Set up GOPATH.
export GOPATH="$HOME/data/go" export GOPATH="$HOME/data/go"
if [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ]; then if [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ]; then
if [ ! -d "$GOPATH" ]; then if [ ! -d "$GOPATH" ]; then
@ -121,6 +121,12 @@ if [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ]; then
fi fi
fi fi
# Use a manually-installed ansible if available.
if [ -x "$HOME/opt/ansible/bin/ansible" ]; then
alias ansible="$HOME/opt/ansible/bin/ansible"
alias ansible-playbook="$HOME/opt/ansible/bin/ansible-playbook"
fi
# Useful aliases for Podman and Docker # Useful aliases for Podman and Docker
alias prun="podman run --rm -it" alias prun="podman run --rm -it"
alias prunx="podman run -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=\"unix\$DISPLAY\"" alias prunx="podman run -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=\"unix\$DISPLAY\""