Refactor SSH configuration in ansible-apply.yaml and fix trusted hosts
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user