diff options
author | uvok cheetah | 2023-10-26 13:44:54 +0200 |
---|---|---|
committer | uvok cheetah | 2023-10-26 13:44:54 +0200 |
commit | 2dd8ecfe443f4910b67276e945a15924a23170ec (patch) | |
tree | aea4842fc0927c0a916bc8e5c023468bc66c7eae | |
parent | 837fee0ff4d9d6a19752d58e1ecf0821333dee9e (diff) |
myansible: Only add keys if none in agent
-rwxr-xr-x | myansible.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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' $@ |