From 41be08a8cf8cd0713d945cd0508efbed3d0ddf03 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Mon, 6 Apr 2020 10:47:35 +0100 Subject: [PATCH] Prefer a locally-installed ansible and ansible-playbook --- roles/home-cli/files/shrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/roles/home-cli/files/shrc b/roles/home-cli/files/shrc index 857ee97..1526adb 100644 --- a/roles/home-cli/files/shrc +++ b/roles/home-cli/files/shrc @@ -106,12 +106,12 @@ if [ ! -d "$HOME/.local/bin" ]; then /bin/mkdir -p "$HOME/.local/bin" 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 alias vi="vim" fi -# Set up GOPATH +# Set up GOPATH. export GOPATH="$HOME/data/go" if [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ]; then if [ ! -d "$GOPATH" ]; then @@ -121,6 +121,12 @@ if [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ]; then 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 alias prun="podman run --rm -it" alias prunx="podman run -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=\"unix\$DISPLAY\""