From 152ec410cfeeeb7d77c5ca987b8f9745d81d409c Mon Sep 17 00:00:00 2001 From: Dominic Robinson Date: Mon, 29 Jan 2024 11:55:46 +0000 Subject: [PATCH] minor fix to rman backup script --- ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2 b/ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2 index 36a9b3e15..b88115105 100755 --- a/ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2 +++ b/ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2 @@ -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 @@ -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 () {