Skip to content

Commit 9f1fa21

Browse files
committed
Add environment name variable for Vault path lookup
1 parent c91ea2a commit 9f1fa21

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

roles/deploy/tasks/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- name: Retrieve service-specific database credentials from Hashicorp Vault
44
set_fact:
5-
"{{ item }}_db_credentials": "{{ lookup('community.hashi_vault.hashi_vault', 'applications/heritage-staging-eu-west-2/tuxedo/database/{{ item }}') }}"
5+
"{{ item }}_db_credentials": "{{ lookup('community.hashi_vault.hashi_vault', 'applications/heritage-{{ environment_name }}-eu-west-2/tuxedo/database/{{ item }}') }}"
66
no_log: True
77
loop: "{{ tuxedo_service_config[tuxedo_user].required_databases }}"
88

roles/deploy/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- name: Check required variables are set
44
assert:
55
that:
6+
- environment_name is defined and environment_name | trim | length > 0
67
- application_artefact_path is defined and application_artefact_path | trim | length > 0
78
- application_configs_path is defined and application_configs_path | trim | length > 0
89
- snmp_host_address is defined and snmp_host_address | trim | length > 0

0 commit comments

Comments
 (0)