File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,17 +39,22 @@ jobs:
3939 needs : lint
4040 runs-on : self-hosted
4141 steps :
42- - uses : actions/checkout@v4
42+ - name : Checkout
43+ uses : actions/checkout@v4
44+ - name : Install Ansible
45+ run : |
46+ sudo apt update
47+ sudo apt install -y ansible
4348 - name : Deploy with Ansible
4449 run : |
4550 cd ansible
46- echo "${{ secrets.ANSIBLE_VAULT_PASSWORD }}" > /tmp/vault_pass
4751 ansible-playbook playbooks/deploy.yml \
48- --vault-password-file /tmp/vault_pass \
49- --tags "app_deploy"
50- rm /tmp/vault_pass
52+ --tags "app_deploy" \
53+ --connection=local \
54+ --inventory="localhost," \
55+ -e "ansible_host=127.0.0.1"
5156 - name : Verify Deployment
5257 run : |
5358 sleep 10 # Wait for app to start
54- curl -f http://${{ secrets.VM_HOST }} :8000 || exit 1
55- curl -f http://${{ secrets.VM_HOST }} :8000/health || exit 1
59+ curl -f http://localhost :8000 || exit 1
60+ curl -f http://localhost :8000/health || exit 1
Original file line number Diff line number Diff line change 11---
22- name : Deploy application
3- hosts : webservers
3+ hosts : all
44 become : true
55
66 roles :
Original file line number Diff line number Diff line change 11---
22- name : Provision web servers
3- hosts : webservers
3+ hosts : all
44 become : true
55
66 roles :
You can’t perform that action at this time.
0 commit comments