|
1 | 1 | --- |
| 2 | + - name: gi-opatch | check if GI has been configured |
| 3 | + stat: path=/etc/oracle/olr.loc |
| 4 | + register: olrloc |
| 5 | + |
| 6 | + - name: gi-opatch | set fact for patch_before_rootsh |
| 7 | + set_fact: |
| 8 | + patch_before_rootsh: False |
| 9 | + when: olrloc.stat.exists and patch_before_rootsh |
2 | 10 |
|
3 | 11 | - name: gi-opatch | Create patch-base directory (version specific) |
4 | 12 | file: |
|
41 | 49 | tags: |
42 | 50 | - ocmconfig |
43 | 51 |
|
44 | | - - name: gi-opatch | Apply opatchauto patches to GI (after sofware only install) |
| 52 | + - name: gi-opatch | Manage opatchauto patches for GI (after software only install) |
45 | 53 | oracle_opatch: |
46 | 54 | oracle_home={{ oracle_home_gi }} |
47 | 55 | patch_base={{ oracle_patch_install }}/{{ oracle_install_version_gi}}/{{ item.0.path | default (item.0.patchid)}}/{{ item.1}} |
|
50 | 58 | opatchauto=False |
51 | 59 | conflict_check=True |
52 | 60 | ocm_response_file={{ ocm_response_file | default(omit)}} |
| 61 | + output=verbose |
53 | 62 | state=present |
54 | 63 | with_subelements: |
55 | 64 | - "{{gi_patches[oracle_install_version_gi]['opatchauto']}}" |
|
59 | 68 | become_user: "{{ grid_install_user }}" |
60 | 69 | tags: |
61 | 70 | - apply_psu_grid |
62 | | - when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatchauto'] is defined and item.0.apply and patch_before_rootsh |
| 71 | + when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatchauto'] is defined and item.0.apply and patch_before_rootsh and not olrloc.stat.exists |
63 | 72 | register: psuapplym |
64 | 73 |
|
65 | | - - name: gi-opatch | Apply opatchauto patches to GI |
| 74 | + - name: gi-opatch | Manage opatchauto patches for GI |
66 | 75 | oracle_opatch: |
67 | 76 | oracle_home={{ oracle_home_gi }} |
68 | 77 | patch_base={{ oracle_patch_install }}/{{ oracle_install_version_gi}}/{{ item.path | default (item.patchid)}}/ |
|
71 | 80 | opatchauto=True |
72 | 81 | conflict_check=True |
73 | 82 | ocm_response_file={{ ocm_response_file | default(omit)}} |
| 83 | + output=verbose |
74 | 84 | state=present |
75 | 85 | with_items: |
76 | 86 | - "{{gi_patches[oracle_install_version_gi]['opatchauto']}}" |
77 | 87 | #run_once: "{{ configure_cluster}}" |
78 | 88 | tags: |
79 | 89 | - apply_psu_grid |
80 | | - when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatchauto'] is defined and item.apply and not patch_before_rootsh |
| 90 | + when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatchauto'] is defined and item.apply and not patch_before_rootsh and olrloc.stat.exists |
81 | 91 | register: psuapplym |
82 | 92 |
|
83 | | - - name: gi-opatch | Apply non opatchauto patches to GI |
| 93 | + - name: gi-opatch | Manage non opatchauto patches for GI |
84 | 94 | oracle_opatch: |
85 | 95 | oracle_home={{ oracle_home_gi }} |
86 | 96 | patch_base={{ oracle_patch_install }}/{{ oracle_install_version_gi}}/{{ item.path | default (item.patchid)}}/ |
|
89 | 99 | opatchauto=False |
90 | 100 | conflict_check=True |
91 | 101 | ocm_response_file={{ ocm_response_file | default(omit)}} |
| 102 | + output=verbose |
92 | 103 | state=present |
93 | 104 | with_items: |
94 | 105 | - "{{gi_patches[oracle_install_version_gi]['opatch']}}" |
|
97 | 108 | become_user: "{{ grid_install_user }}" |
98 | 109 | tags: |
99 | 110 | - apply_psu_grid |
100 | | - when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatch'] is defined and item.apply #and not patch_before_rootsh |
| 111 | + when: apply_patches_gi and gi_patches is defined and gi_patches[oracle_install_version_gi] is defined and gi_patches[oracle_install_version_gi]['opatch'] is defined and item.apply and patch_before_rootsh and not olrloc.stat.exists |
101 | 112 | register: psuapplym |
102 | 113 | # |
103 | 114 | # |
|
0 commit comments