ansible_host: ShellCheck fixes

This commit is contained in:
Timo Makinen 2022-10-31 01:36:12 +00:00
parent 3e216a2d30
commit fd7e470914

View file

@ -1,3 +1,4 @@
# shellcheck shell=sh
# .bashrc
# User specific aliases and functions
@ -8,12 +9,15 @@ alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
# shellcheck source=/dev/null
. /etc/bashrc
fi
# make sure that ssh agent is running and connect to it
[ -f /root/.ssh/agent ] && source /root/.ssh/agent > /dev/null
if ! kill -0 "${SSH_AGENT_PID}" > /dev/null 2>&1 ; then
# shellcheck source=/dev/null
[ -f /root/.ssh/agent ] && . /root/.ssh/agent > /dev/null
if ! kill -0 "$SSH_AGENT_PID" > /dev/null 2>&1 ; then
ssh-agent -s > /root/.ssh/agent
source /root/.ssh/agent > /dev/null
# shellcheck source=/dev/null
. /root/.ssh/agent > /dev/null
fi