Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle/19c ru patch upgrade #451

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ansible/roles/oracle-19c/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,15 @@ oracle_patch_details:
oracle_release_update: 35037840
oracle_ojvm_patch: 35050341
psu_patch: p35058172_190000_Linux-x86-64.zip
patch_string: 19.19.0.0
ojvm_patch_string: "OJVM RELEASE UPDATE: 19.19.0.0"
patch_string: "19.19.0.0.230418"

SEP2023:
opatch_version: 12.2.0.1.37
oracle_combo_patch: 35742441
oracle_release_update: 35642822
oracle_ojvm_patch: 35648110
psu_patch: p35742441_190000_Linux-x86-64.zip
patch_string: 19.21.0.0
ojvm_patch_string: "OJVM RELEASE UPDATE: 19.21.0.0"
patch_string: "19.21.0.0.231017"

oracle_patch: "{{ oracle_patch_details[ oracle_ru_patch ] }}"
opatch: "p6880880_190000_Linux-x86-64-{{ oracle_patch.opatch_version }}.zip"
10 changes: 6 additions & 4 deletions ansible/roles/oracle-19c/tasks/oracle_ojvm_patch_upgrade.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
- name: Get OJVM patch details
become_user: "{{ oracle_install_user }}"
become: yes
ansible.builtin.shell: |
export ORACLE_HOME={{ database_home }}
{{ database_home }}/OPatch/opatch lspatches | grep {{ oracle_patch.ojvm_patch_string }} | wc -l
${ORACLE_HOME}/OPatch/opatch lspatches | grep OJVM | grep {{ oracle_patch.patch_string }}| wc -l
register: ojvm_patch_version_check

- name: OJVM patch upgrade
block:
- name: Shutdown databases before applying OJVM patch
ansible.builtin.shell: date

- name: Shutdown databases before applying OJVM patch
ansible.builtin.shell: |
export ORACLE_SID=+ASM
Expand Down Expand Up @@ -67,6 +72,3 @@
when: ojvm_patch_version_check.stdout == "0"
become: yes
become_user: "{{ oracle_install_user }}"
environment:
ORACLE_HOME: "{{ database_home }}"
PATH: "{{ database_home }}/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"
6 changes: 4 additions & 2 deletions ansible/roles/oracle-19c/tasks/oracle_patch_upgrade.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
- name: Get RU patch details
- name: Get Oracle Grid Infrastructure patch details
become_user: "{{ oracle_install_user }}"
become: yes
ansible.builtin.shell: |
export ORACLE_HOME={{ grid_home }}
{{ grid_home }}/OPatch/opatch lspatches | grep {{ oracle_patch.patch_string }} | wc -l
${ORACLE_HOME}/OPatch/opatch lspatches | grep Database | grep {{ oracle_patch.patch_string }}| wc -l
register: grid_patch_version_check

- name: RU patch upgrade
Expand Down