Skip to content

Commit 6c3eaf1

Browse files
authored
Use vault-id (#1749)
1 parent e4ef8d8 commit 6c3eaf1

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

.github/.vault

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/prod-deploy.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ concurrency:
1414

1515
env:
1616
COB_DATAPIPELINE_BRANCH: ${{ github.ref_name }}
17+
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
1718

1819
jobs:
1920
prod-deploy:
2021
runs-on: ubuntu-latest
21-
env:
22-
ANSIBLE_VAULT_PASSWORD: ${{ vars.ANSIBLE_VAULT_PASSWORD }}
23-
2422
timeout-minutes: 30
2523
strategy:
2624
matrix:
@@ -53,6 +51,4 @@ jobs:
5351
working-directory: ansible-playbook-airflow
5452
run: |
5553
pipenv run ansible-galaxy install -r requirements.yml
56-
cp "${GITHUB_WORKSPACE}/.github/.vault" "${HOME}/.vault"
57-
chmod +x ~/.vault
58-
pipenv run ansible-playbook -i inventory/prod playbook.yml --tags "jumphost,role::airflow::dags" --vault-password-file=~/.vault -e 'ansible_ssh_port=9229' -e cob_datapipeline_branch=$COB_DATAPIPELINE_BRANCH
54+
pipenv run ansible-playbook -i inventory/prod playbook.yml --tags "jumphost,role::airflow::dags" --vault-id @env:ANSIBLE_VAULT_PASSWORD -e 'ansible_ssh_port=9229' -e cob_datapipeline_branch=$COB_DATAPIPELINE_BRANCH

.github/workflows/qa-deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
qa-deploy:
1717
runs-on: ubuntu-latest
1818
env:
19-
ANSIBLE_VAULT_PASSWORD: ${{ vars.ANSIBLE_VAULT_PASSWORD }}
19+
ANSIBLE_VAULT_PASSWORD: ${{ secrets.ANSIBLE_VAULT_PASSWORD }}
2020

2121
timeout-minutes: 30
2222
strategy:
@@ -50,6 +50,4 @@ jobs:
5050
working-directory: ansible-playbook-airflow
5151
run: |
5252
pipenv run ansible-galaxy install -r requirements.yml
53-
cp "${GITHUB_WORKSPACE}/.github/.vault" "${HOME}/.vault"
54-
chmod +x ~/.vault
55-
pipenv run ansible-playbook -i inventory/qa playbook.yml --tags "jumphost,role::airflow::dags" --vault-password-file=~/.vault -e 'ansible_ssh_port=9229'
53+
pipenv run ansible-playbook -i inventory/qa playbook.yml --tags "jumphost,role::airflow::dags" --vault-id @env:ANSIBLE_VAULT_PASSWORD -e 'ansible_ssh_port=9229'

0 commit comments

Comments
 (0)