Skip to content

Commit 293018b

Browse files
committed
oraswgi_manage_patches
1 parent 044551a commit 293018b

File tree

4 files changed

+8
-23
lines changed

4 files changed

+8
-23
lines changed

roles/oraswgi_manage_patches/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Install/Remove Patches from Oracle Database Homes
66

77
- [Requirements](#requirements)
88
- [Discovered Tags](#discovered-tags)
9-
- [Open Tasks](#open-tasks)
109
- [Dependencies](#dependencies)
1110
- [License](#license)
1211
- [Author](#author)
@@ -26,9 +25,6 @@ Install/Remove Patches from Oracle Database Homes
2625

2726
**_current_opatch_version_**
2827

29-
## Open Tasks
30-
31-
- (information): support for www download missing
3228

3329
## Dependencies
3430

roles/oraswgi_manage_patches/tasks/loop_patchid.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
opatchauto: {{ __opatchauto_patchtype }}
1414
- >-
1515
patchsubdir: {{ __oraswdb_manage_patches_patchsubdir | default('') }}
16+
custom_path: {{ gip_opatch.0.path | default('') }}
1617
1718
- name: loop_patchid | Work on oracle_sw_patches
1819
ansible.builtin.include_tasks: loop_stage_patch.yml
@@ -45,7 +46,7 @@
4546
opitzconsulting.ansible_oracle.oracle_opatch:
4647
oracle_home: "{{ oracle_home_gi }}"
4748
patch_base: >-
48-
{{ oracle_patch_install }}/{{ oracle_install_version_gi }}/{{ dhc_opatch.path | default(__patch_base_local) }}
49+
{{ oracle_patch_install }}/{{ oracle_install_version_gi }}/{{ gip_opatch.0.path | default(__patch_base_local) }}
4950
patch_id: "{{ gip_opatch.0.patchid }}"
5051
patch_version: "{{ gip_opatch.0.patchversion | default(omit) }}"
5152
exclude_upi: "{{ gip_opatch.0.excludeUPI | default(omit) }}"

roles/oraswgi_manage_patches/tasks/loop_stage_patch.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
oracle_patch_stage: {{ oracle_patch_stage }}
1414
oracle_sw_copy: {{ oracle_sw_copy | bool }}
1515
is_sw_source_local: {{ is_sw_source_local | bool }}
16-
- >-
17-
creates: {{ __sw_patches_filename_creates }}
18-
patch_unarchive_dir: {{ __patch_unarchive_dir }}
1916
2017
- name: Loop_stage_patch | Become User to oracle
2118
become: true
@@ -45,25 +42,17 @@
4542
- name: Loop_stage_patch | Check for unarchived patch archive
4643
ansible.builtin.stat:
4744
path: "{{ _oraswgi_manage_patches_creates }}"
48-
register: checkpatcharchiveres
45+
register: __checkpatcharchiveres
4946

5047
- name: Loop_stage_patch | Copy oracle GI/Restart patch to server (local)
51-
ansible.builtin.copy:
52-
src: "{{ oracle_sw_source_local }}/{{ _oraswgi_manage_patches_sw_patch_dict.filename }}"
53-
dest: "{{ oracle_stage }}/{{ _oraswgi_manage_patches_sw_patch_dict.filename }}"
54-
mode: "0644"
55-
force: false
5648
when:
5749
- oracle_sw_copy | bool
58-
- osp_loop.state == 'present'
5950
block:
6051

6152
- name: Loop_stage_patch | Check for unarchived patch archive
6253
ansible.builtin.stat:
63-
path: "{{ __patch_unarchive_dir }}/{{ __sw_patches_filename_creates }}"
64-
register: checkpatcharchiveres
65-
vars:
66-
__sw_patches_filename_creates: "{{ osp_loop.creates | default((osp_loop.patchid | string) + '/README.txt') }}"
54+
path: "{{ _oraswgi_manage_patches_creates }}"
55+
register: __checkpatcharchiveres
6756

6857
- name: Loop_stage_patch | Copy oracle GI patch (opatch) to server (local)
6958
ansible.builtin.copy:
@@ -73,7 +62,7 @@
7362
force: false
7463
when:
7564
- is_sw_source_local | bool
76-
- not checkpatcharchiveres.stat.exists
65+
- not __checkpatcharchiveres.stat.exists
7766

7867
- name: Loop_stage_patch | Copy oracle GI patch (opatch) to server (www)
7968
ansible.builtin.get_url:
@@ -83,13 +72,12 @@
8372
force: false
8473
when:
8574
- not is_sw_source_local | bool
86-
- not checkpatcharchiveres.stat.exists | bool
75+
- not __checkpatcharchiveres.stat.exists | bool
8776

8877
- name: Loop_stage_patch | Extract one-off patch files to patch base
8978
when:
9079
- oracle_sw_copy | bool
9180
- oracle_sw_unpack | bool
92-
- osp_loop.state == 'present'
9381
tags:
9482
- oraswdbpsuunpack1
9583
block:

roles/oraswgi_manage_patches/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
- name: Set facts for installed patches
127127
ansible.builtin.set_fact:
128128
_oraswgi_gi_patches: >-
129-
{{ opatch_content['InventoryInstance']['patches']['patch'] | ansible.utils.keep_keys(target=['uniquePatchID', 'patchID', 'patchDescription']) }}
129+
{{ opatch_content['InventoryInstance']['patches']['patch'] | default([]) | ansible.utils.keep_keys(target=['uniquePatchID', 'patchID', 'patchDescription']) }}
130130
vars:
131131
opatch_content: "{{ _opatch_lsinv_xml_res['content'] | b64decode | ansible.utils.from_xml }}"
132132

0 commit comments

Comments
 (0)