Skip to content

Commit

Permalink
Change if expression
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbeersingh1 committed Nov 27, 2023
1 parent 67466f4 commit f4c4048
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/oracle-db-backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,15 @@ jobs:
run: $backup_command -i $inventory -e rman_target=$RmanTarget -e daily_weekly=$Period -e enable_trace=$EnableTrace $VerboseOutput

- name: Start Ansible Backup On First Standby (If Exists) If Primary Backup Failed
if: job.steps.backup.status == failure() && ${env.RmanTarget} ~= .*primarydb && -e ${env.inventory}/group_vars/${RmanTarget/primarydb/standbydb1}.yml
if: ${{ job.steps.backup.status == failure() && contains(env.RmanTarget,'primarydb') }}
shell: bash
run: $backup_command -i $inventory -e rman_target=${RmanTarget/primarydb/standbydb1} -e daily_weekly=$Period -e enable_trace=$EnableTrace $VerboseOutput
run: |
if [[ -e ${inventory}/group_vars/${RmanTarget/primarydb/standbydb1}.yml ]]
then
$backup_command -i $inventory -e rman_target=${RmanTarget/primarydb/standbydb1} -e daily_weekly=$Period -e enable_trace=$EnableTrace $VerboseOutput
else
echo "Standby Not Configured"
fi
- name: Start Ansible Validate And Fix Absent Chunks
run: $validate_command -i $inventory -e rman_target=$RmanTarget -e fix_absent_chunks=$FixAbsentChunks $VerboseOutput
Expand Down

0 comments on commit f4c4048

Please sign in to comment.