From 2dd8ecfe443f4910b67276e945a15924a23170ec Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 26 Oct 2023 13:44:54 +0200 Subject: myansible: Only add keys if none in agent --- myansible.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/myansible.sh b/myansible.sh index fbe4e9b..9148348 100755 --- a/myansible.sh +++ b/myansible.sh @@ -2,10 +2,12 @@ ## wrapper for ansible, ensuring password is provided +if ! ssh-add -l >/dev/null; then ssh-add ~/.ssh/ansible ssh-add ~/.ssh/id_hetz ssh-add ~/.ssh/id_netcup ssh-add ~/.ssh/id_rsa ssh-add ~/.ssh/firstroot +fi ansible-playbook --ask-vault-pass -b -e '@passwd.yml' $@ -- cgit v1.2.3