Skip to content

Commit 92b3385

Browse files
fix workflow
1 parent a75be1f commit 92b3385

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/workflows/ansible-deploy.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff 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

ansible/playbooks/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Deploy application
3-
hosts: webservers
3+
hosts: all
44
become: true
55

66
roles:

ansible/playbooks/provision.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: Provision web servers
3-
hosts: webservers
3+
hosts: all
44
become: true
55

66
roles:

0 commit comments

Comments
 (0)