Refactor SSH configuration in ansible-apply.yaml to remove SSH_PASSWORD usage
This commit is contained in:
@@ -57,8 +57,7 @@ jobs:
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
|
||||
run: |
|
||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
||||
SSH_PASSWORD="$(sectool vault get SSH_PASSWORD)"
|
||||
echo 'echo $SSH_PASSWORD' > ~/.ssh_askpass && chmod +x ~/.ssh_askpass
|
||||
echo 'sectool vault get SSH_PASSWORD' > ~/.ssh_askpass && chmod +x ~/.ssh_askpass
|
||||
DISPLAY=None SSH_ASKPASS=~/.ssh_askpass ssh-add ~/.ssh/id_ecdsa < /dev/null
|
||||
rm ~/.ssh_askpass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user