Skip to content

Commit 2641576

Browse files
committed
Changes to oraswgi-opatch to remove 'master_node' functionality
1 parent fb71d42 commit 2641576

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

roles/oraswgi-opatch/defaults/main.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
22

3-
master_node: true
3+
#master_node: true
44
role_separation: false
55
hostgroup: "{{ group_names[0] }}"
6+
cluster_master: "{{play_hosts[0]}}"
67
configure_cluster: false
78
oracle_psu_apply_gi: true
89

@@ -35,14 +36,25 @@
3536

3637
oracle_hostname: "{{ ansible_fqdn }}" # Full (FQDN) name of the host
3738

39+
# gi_patches:
40+
# 12.2.0.1:
41+
# opatchauto:
42+
# - 27468969
43+
# oneoff: []
44+
# 12.1.0.2:
45+
# opatchauto:
46+
# - 20485724
47+
# oneoff: []
3848

3949
oracle_sw_image_gi_psu: # Files containing the installation media for Grid Infrastructure
50+
- { filename: p27468969_122010_Linux-x86-64.zip, patchid: 27468969, version: 12.2.0.1, patchversion: 12.2.0.1.180417, description: GI-RU-April-2018 }
4051
#- { filename: p19392646_121020_Linux-x86-64.zip, patchid: 19392646, version: 12.1.0.2, patchversion: 12.1.0.2.1, description: GI-PSU-Oct-2014 }
4152
#- { filename: p20485724_121020_Linux-x86-64.zip, patchid: 20485724, version: 12.1.0.2, patchversion: 12.1.0.2.3, description: GI-PSU-Apr-2015 }
4253
#- { filename: p21523234_121020_Linux-x86-64.zip, patchid: 21523234, version: 12.1.0.2, patchversion: 12.1.0.2.5, description: GI-PSU-Oct-2015 }
4354
#- { filename: p24412235_121020_Linux-x86-64.zip, patchid: 24412235, version: 12.1.0.2, patchversion: 12.1.0.2.161018, description: GI-PSU-Oct-2016 }
4455
#- { filename: p24968615_121020_Linux-x86-64.zip, patchid: 24968615, version: 12.1.0.2, patchversion: 12.1.0.2.170117, description: GI-PSU-Jan-2017}
45-
- { filename: p25434003_121020_Linux-x86-64.zip, patchid: 25434003, version: 12.1.0.2, patchversion: 12.1.0.2.170418, description: GI-PSU-Apr-2017}
56+
#- { filename: p25434003_121020_Linux-x86-64.zip, patchid: 25434003, version: 12.1.0.2, patchversion: 12.1.0.2.170418, description: GI-PSU-Apr-2017}
57+
- { filename: p27468957_121020_Linux-x86-64.zip, patchid: 27468957 , version: 12.1.0.2, patchversion: 12.1.0.2.170418, description: GI-PSU-Apr-2018}
4658
#- { filename: p19380115_112040_Linux-x86-64.zip, patchid: 19380115, version: 11.2.0.4, patchversion: 11.2.0.4.4, description: GI-PSU-Oct-2014 }
4759
#- { filename: p20485808_112040_Linux-x86-64.zip, patchid: 20485808, version: 11.2.0.4, patchversion: 11.2.0.4.6, description: GI-PSU-Apr-2015 }
4860
- { filename: p21523375_112040_Linux-x86-64.zip, patchid: 21523375, version: 11.2.0.4, patchversion: 11.2.0.4.8, description: GI-PSU-Oct-2015 }

roles/oraswgi-opatch/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
become_user: "{{ grid_install_user }}"
77
with_items: "{{oracle_sw_image_gi_psu}}"
88
tags: check_applied_gi_patches
9-
when: oracle_psu_apply_gi #and "{{ item.version }}" == "{{ oracle_install_version_gi }}"
9+
when: oracle_psu_apply_gi and item.version == oracle_install_version_gi
1010
register: gi_applied_patches
1111

1212

@@ -75,7 +75,7 @@
7575
with_together:
7676
- "{{oracle_sw_image_gi_psu}}"
7777
- "{{gi_applied_patches.results}}"
78-
when: oracle_psu_apply_gi and item.0.version == oracle_install_version_gi and not item.1.stdout != 0 and not oracle_sw_copy and oracle_sw_unpack
78+
when: oracle_psu_apply_gi and item.0.version == oracle_install_version_gi and not oracle_sw_copy and oracle_sw_unpack #and not item.1.stdout != 0
7979
tags:
8080
- oragridpsuunpack
8181

@@ -113,15 +113,15 @@
113113
# tags:
114114
# - ocmconfig
115115

116-
- name: Apply PSU to GI (v12.1) (Master node)
116+
- name: Apply PSU to GI (v12.x) (Master node)
117117
shell: "{{ oracle_home_gi }}/OPatch/opatchauto apply {{ oracle_psu_stage }}/{{ oracle_install_version_gi }}/{{ item.0.patchid }} -oh {{ oracle_home_gi }}" #-ocmrf {{ oracle_psu_stage }}/{{ oracle_install_version_gi }}/ocm.rsp "
118118
with_together:
119119
- "{{oracle_sw_image_gi_psu}}"
120120
- "{{gi_applied_patches.results}}"
121121
run_once: "{{ configure_cluster}}"
122122
tags:
123123
- apply_psu_grid
124-
when: oracle_psu_apply_gi and '12.1' in oracle_install_version_gi and item.0.version == oracle_install_version_gi and not item.1.stdout != 0
124+
when: oracle_psu_apply_gi and '12.1' in oracle_install_version_gi or '12.2' in oracle_install_version_gi and item.0.version == oracle_install_version_gi #and not item.1.stdout != 0
125125
register: psuapplym
126126

127127

@@ -177,7 +177,7 @@
177177
register: psuapplyo
178178

179179
- debug: var=psuapplyo.stdout_lines
180-
when: configure_cluster and inventory_hostname != cluster_master oracle_psu_apply_gi
180+
when: configure_cluster and inventory_hostname != cluster_master and oracle_psu_apply_gi and psuapplyo is defined
181181
tags:
182182
- psuapplyo
183183

0 commit comments

Comments
 (0)