Skip to content

Commit

Permalink
Fail if OPatch version is less the minimum required version
Browse files Browse the repository at this point in the history
  • Loading branch information
ranbeersingh1 committed Dec 6, 2024
1 parent d866dd9 commit 173aca6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,8 @@

- name: Show Minimum OPatch Version
debug: var=minimum_opatch_version

- name: Fail if OPatch Version Is Less Than Required Minimum Version
fail:
msg: "OPatch version is less than the required minimum version"
when: opatch_id < minimum_opatch_version
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
# If "default" is specified then we use the values from hmpps_env_configs instead
- name: Override Required OPatch ID and Filename
set_fact:
opatch_id: "{{ opatch_info.split(':')[0] }}"
opatch_id: "{{ opatch_info.split(':')[2] | regex_replace('^\\((.*)\\)$', '\\1') }}"
opatch_zip: "{{ opatch_info.split(':')[1] }}"
when: opatch_info != 'default'

Expand Down Expand Up @@ -195,6 +195,12 @@
- name: Get Current and Target Version Information
include_tasks: get_versioning_information.yml

- name: Fail if OPatch Version Is Not Equal To Greater Than Required Minimum Version
fail:
msg: "OPatch version is less than the required minimum version"
when: opatch_id < minimum_opatch_version


# Existing Restore Points will Cause Failure of Compatibility Setting Changes
- name: Count Existing Restore Points
script: get_restore_point_count.sh
Expand Down

0 comments on commit 173aca6

Please sign in to comment.