From 9532fa165e381463e883b989d497389fd76bc1b1 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Fri, 28 Aug 2020 07:32:56 +0000 Subject: [PATCH] ansible-host: Add missing bashrc file --- roles/ansible-host/files/root-bashrc.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 roles/ansible-host/files/root-bashrc.sh diff --git a/roles/ansible-host/files/root-bashrc.sh b/roles/ansible-host/files/root-bashrc.sh new file mode 100644 index 0000000..3d2737d --- /dev/null +++ b/roles/ansible-host/files/root-bashrc.sh @@ -0,0 +1,19 @@ +# .bashrc + +# User specific aliases and functions + +alias rm='rm -i' +alias cp='cp -i' +alias mv='mv -i' + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /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 + ssh-agent -s > /root/.ssh/agent + source /root/.ssh/agent > /dev/null +fi