Refactor SSH configuration in ansible-apply.yaml and fix trusted hosts

This commit is contained in:
2024-09-24 17:22:31 +02:00
parent 63efc31e35
commit 85d97a8d74
+1 -3
View File
@@ -37,14 +37,12 @@ jobs:
- name: Configure SSH to Disable Host Key Checking
env:
TRUSTE_HOSTS: ${{ secrets.TRUSTED_HOSTS }}
TRUSTED_HOSTS: ${{ secrets.TRUSTED_HOSTS }}
run: |
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
for host in $TRUSTED_HOSTS; do
ssh-keyscan $host >> ~/.ssh/known_hosts
done
cat ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
- name: Apply Ansible Playbook