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,15 +39,19 @@ 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+ -e "ansible_host=127.0.0.1"
5155 - name : Verify Deployment
5256 run : |
5357 sleep 10 # Wait for app to start
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