Skip to content

Commit 99d2bcc

Browse files
committed
fix: hosts.yml structure so correct vars are used
1 parent 831e7cc commit 99d2bcc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
needs: [set-image-suffix, build-and-push]
113113
if: |
114114
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-stage')) ||
115-
(github.ref == 'refs/heads/main' && github.event_name == 'push')
115+
(github.ref == 'refs/heads/main' && github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
116116
steps:
117117
- name: Checkout repository
118118
uses: actions/checkout@v4
@@ -135,7 +135,7 @@ jobs:
135135
name: Deploy to production
136136
runs-on: ubuntu-latest
137137
needs: [set-image-suffix, build-and-push, deploy-stage]
138-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
138+
if: github.ref == 'refs/heads/main' && github.event_name == 'push' || (github.event_name == 'workflow_dispatch')
139139
steps:
140140
- name: Checkout repository
141141
uses: actions/checkout@v4

ansible/inventory/hosts.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ all:
33
children:
44
pullsar_stage:
55
hosts:
6-
localhost:
6+
stage_host:
77
ansible_connection: local
8+
ansible_host: localhost
89
pullsar_prod:
910
hosts:
10-
localhost:
11+
prod_host:
1112
ansible_connection: local
13+
ansible_host: localhost

0 commit comments

Comments
 (0)