Skip to content

Commit

Permalink
minor fix to rman backup script (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
drobinson-moj authored Mar 1, 2024
1 parent 261d8ce commit 21a3017
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ set_ora_env () {
}

get_rcat_creds () {
(
account_id=$(aws sts get-caller-identity --query Account --output text)
secret_account_id="{{ account_ids[oem_account_name] }}"
if [[ $account_id != $secret_account_id ]]; then
Expand All @@ -92,6 +93,7 @@ get_rcat_creds () {
fi
secret_arn="arn:aws:secretsmanager:eu-west-2:${secret_account_id}:secret:{{ rcvcat_passwords_secret_name }}"
aws secretsmanager get-secret-value --secret-id "${secret_arn}" --query SecretString --output text | jq -r .rcvcatowner
)
}

validate () {
Expand Down

0 comments on commit 21a3017

Please sign in to comment.