File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ jobs:
1616 uses : actions/checkout@v4
1717
1818 - name : Set up SSH key
19- run : |
20- mkdir -p ~/.ssh
21- echo " ${{ secrets.EC2_SSH_KEY }}" > ~/.ssh/id_rsa
22- chmod 600 ~/.ssh/id_rsa
19+ uses : kielabokkie/ssh-key-and-known-hosts-action@v1
20+ with :
21+ ssh-private-key : ${{ secrets.EC2_SSH_KEY }}
22+ ssh-host : ${{ vars.SSH_PROXY_HOST }}
2323
2424 - name : Add SSH config
2525 run : |
5757 - name : Run Ansible Playbook
5858 run : |
5959 ansible-playbook ansible/deploy.yml \
60- -i ansible/inventory.ini \
61- --private-key ~/.ssh/id_rsa \
62- -u ubuntu
60+ -i ansible/inventory.ini
Original file line number Diff line number Diff line change 11[web]
2- ec2-instance ansible_host =172.31.20.60 ansible_user =ubuntu
2+ ec2-instance ansible_host =ec2-docker ansible_user =ubuntu
You can’t perform that action at this time.
0 commit comments