Skip to content

Commit

Permalink
Update run-ansible-configs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Saumya40-codes authored Aug 4, 2024
1 parent bc191fa commit 74af9e0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/run-ansible-configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ jobs:
- name: Add target host to known_hosts
run: |
ssh-keyscan -H "${{ secrets.EC2_PRIVATE_IP_1 }}" >> ~/.ssh/known_hosts 2>/dev/null || echo "ssh-keyscan failed"
- name: Check EC2 instance accessibility
run: |
echo "Checking EC2 instance accessibility"
ping -c 4 ${{ secrets.EC2_PRIVATE_IP_1 }} || echo "Ping failed"
nc -zv ${{ secrets.EC2_PRIVATE_IP_1 }} 22 || echo "Netcat failed"
- name: Test SSH connection
run: |
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no ubuntu@${{ secrets.EC2_PRIVATE_IP_1 }} echo "SSH connection successful" || echo "SSH connection failed"
- name: Run Ansible Playbook
run: |
Expand Down

0 comments on commit 74af9e0

Please sign in to comment.