|
7 | 7 | sudo_user: "{{ oracle_user }}" |
8 | 8 | environment: env |
9 | 9 | register: dblist |
10 | | - when: master_node |
| 10 | + |
| 11 | +- debug: var=dblist.stdout_lines |
| 12 | + |
| 13 | +- name: RAC | Generate srvctl state file |
| 14 | + template: |
| 15 | + src: srvctl_state.j2 |
| 16 | + dest: "{{ oracle_home }}/srvm/admin/psu_state.txt" |
| 17 | + owner: "{{ oracle_user }}" |
| 18 | + group: "{{ oracle_group }}" |
11 | 19 |
|
12 | 20 | - name: RAC | delete srvctl state file if it exists |
13 | 21 | file: path={{ oracle_home }}/srvm/admin/oneoffstop.txt state=absent |
14 | | - |
| 22 | + |
15 | 23 | - name: RAC | Update opatch |
16 | 24 | unarchive: |
17 | 25 | src: "{{ oracle_stage_install }}/{{ opatch[oracle_version].filename }}" |
|
35 | 43 | - debug: var=lsinv_pre.results |
36 | 44 |
|
37 | 45 | - name: RAC | Check PSU for conflicts |
38 | | - shell: "{{ item }}/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir {{ oracle_stage_install }}/{{ oracle_version }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }}" |
| 46 | + shell: "{{ item }}/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir {{ patch_directory }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }}" |
39 | 47 | sudo: yes |
40 | 48 | sudo_user: "{{ oracle_user }}" |
41 | 49 | register: opatch_conflicts |
|
44 | 52 | - "{{ grid_home|default(omit) }}" |
45 | 53 |
|
46 | 54 | - name: RAC | Apply patch to first node |
47 | | - shell: "{{ grid_home }}/OPatch/opatch auto {{ oracle_stage_install }}/{{ oracle_version }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }} -ocmrf {{ oracle_stage_install }}/ocm.rsp" |
| 55 | + shell: "{{ grid_home }}/OPatch/opatch auto {{ patch_directory }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }} -ocmrf {{ oracle_stage_install }}/ocm.rsp" |
48 | 56 | sudo: yes |
49 | 57 | sudo_user: root |
50 | 58 | when: master_node |
|
61 | 69 | when: master_node |
62 | 70 |
|
63 | 71 | - name: RAC | Startup Oracle Home on first node |
64 | | - shell: srvctl start home -o {{ oracle_home }} -s {{ oracle_home }}/srvm/admin/oneoffstop.txt -n {{ ansible_hostname }} |
| 72 | + shell: srvctl start home -o {{ oracle_home }} -s {{ oracle_home }}/srvm/admin/psu_state.txt -n {{ ansible_hostname }} |
65 | 73 | sudo: yes |
66 | 74 | sudo_user: "{{ oracle_user }}" |
67 | 75 | environment: env |
|
76 | 84 |
|
77 | 85 | - debug: var=stat_res_t.stdout_lines |
78 | 86 |
|
| 87 | +- name: RAC | Pause after first node |
| 88 | + pause: prompt="Verify everything's running on the first node." |
| 89 | + |
79 | 90 | - name: RAC | Apply patch to second node |
80 | | - shell: "{{ grid_home }}/OPatch/opatch auto {{ oracle_stage_install }}/{{ oracle_version }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }} -ocmrf {{ oracle_stage_install }}/ocm.rsp" |
| 91 | + shell: "{{ grid_home }}/OPatch/opatch auto {{ patch_directory }}/{{ psu[oracle_version][psu_name][oracle_install_type].patchid }} -ocmrf {{ oracle_stage_install }}/ocm.rsp" |
81 | 92 | sudo_user: root |
82 | 93 | when: not master_node |
83 | 94 |
|
|
93 | 104 | when: not master_node |
94 | 105 |
|
95 | 106 | - name: RAC | Startup Oracle Home on second node |
96 | | - shell: srvctl start home -o {{ oracle_home }} -s {{ oracle_home }}/srvm/admin/oneoffstop.txt -n {{ ansible_hostname }} |
| 107 | + shell: srvctl start home -o {{ oracle_home }} -s {{ oracle_home }}/srvm/admin/psu_state.txt -n {{ ansible_hostname }} |
97 | 108 | sudo: yes |
98 | 109 | sudo_user: "{{ oracle_user }}" |
99 | 110 | environment: env |
|
111 | 122 | - "{{ oracle_home }}" |
112 | 123 | - "{{ grid_home|default(omit) }}" |
113 | 124 | register: lsinv_post |
| 125 | + |
| 126 | +- debug: var=lsinv_post.results |
0 commit comments