asdf
This commit is contained in:
@@ -50,18 +50,21 @@ jobs:
|
|||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
chmod 700 ~/.ssh
|
chmod 700 ~/.ssh
|
||||||
|
|
||||||
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_ed25519
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
|
||||||
ssh-keyscan -H 213.95.90.157 >> ~/.ssh/known_hosts
|
ssh-keyscan -H 213.95.90.157 >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
eval "$(ssh-agent -s)"
|
eval "$(ssh-agent -s)"
|
||||||
ssh-add ~/.ssh/id_rsa <<< "$SSH_PASSPHRASE"
|
if [ -n "${SSH_PASSPHRASE:-}" ]; then
|
||||||
|
echo "$SSH_PASSPHRASE" | ssh-add ~/.ssh/id_ed25519
|
||||||
ssh -o BatchMode=yes root@213.95.90.157 "echo SSH OK"
|
else
|
||||||
|
ssh-add ~/.ssh/id_ed25519
|
||||||
|
fi
|
||||||
|
|
||||||
|
ssh -o BatchMode=yes root@213.95.90.157 true
|
||||||
|
|
||||||
- name: Run Ansible
|
- name: Run Ansible
|
||||||
run: |
|
run: |
|
||||||
ansible-playbook -i ansible/inventory.yaml site.yaml
|
ansible-playbook -i ansible/inventory.yaml site.yaml
|
||||||
|
|
||||||
Reference in New Issue
Block a user