Skip to content
Closed
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
3 changes: 3 additions & 0 deletions changelogs/fragments/absolute-filesources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
major_changes:
- "location of files not located under oracle_sw_source_www/filename or oracle_sw_source_local/filename, or named other than {{filename}}, can be forced by absolute path/URL"
13 changes: 13 additions & 0 deletions roles/oracluvfy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Manage Cluster Verification Utility from Oracle
- [Requirements](#requirements)
- [Default Variables](#default-variables)
- [oracluvfy_archive](#oracluvfy_archive)
- [oracluvfy_archive_filesource](#oracluvfy_archive_filesource)
- [oracluvfy_force_update](#oracluvfy_force_update)
- [oracluvfy_home](#oracluvfy_home)
- [Discovered Tags](#discovered-tags)
Expand All @@ -32,6 +33,18 @@ ZIP Archive used by the role.
oracluvfy_archive: cvupack_linux_ol7_x86_64.zip
```

### oracluvfy_archive_filesource

If `oracluvfy_archive` ist not placed under `oracle_sw_source_local` / `oracle_sw_source_www`,
path can be forced using `oracluvfy_archive_filesource` instead.
`oracluvfy_archive_filesource` must be the full path/URL, including the filename.

#### Example usage

```YAML
oracluvfy_archive_filesource: /full/path/to/cvupack_linux_ol7_x86_64.zip
```

### oracluvfy_force_update

Force unarchive of cluvfy in `oracluvfy_home`.
Expand Down
9 changes: 9 additions & 0 deletions roles/oracluvfy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ oracluvfy_home: "{{ oracle_base }}/product/cluvfy"
# @end
oracluvfy_archive: cvupack_linux_ol7_x86_64.zip

# @var oracluvfy_archive_filesource:description: >
# If `oracluvfy_archive` ist not placed under `oracle_sw_source_local` / `oracle_sw_source_www`,
# path can be forced using `oracluvfy_archive_filesource` instead.
# `oracluvfy_archive_filesource` must be the full path/URL, including the filename.
# @end
# @var oracluvfy_archive_filesource:example: >
# oracluvfy_archive_filesource: /full/path/to/cvupack_linux_ol7_x86_64.zip
# @end

# @var oracluvfy_force_update:description: >
# Force unarchive of cluvfy in `oracluvfy_home`.
# @end
Expand Down
8 changes: 4 additions & 4 deletions roles/oracluvfy/tasks/install_cluvfy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
block:
- name: install_cluvfy | download cluvfy (copy)
ansible.builtin.copy:
src: "{{ oracle_sw_source_local }}/{{ oracluvfy_archive }}"
dest: "{{ oracle_stage }}"
src: "{{ oracluvfy_archive_filesource | default(oracle_sw_source_local + '/' + oracluvfy_archive, true) }}"
dest: "{{ oracle_stage }}/{{ oracluvfy_archive }}"
mode: 0664
force: false
remote_src: false
Expand All @@ -26,8 +26,8 @@

- name: install_cluvfy | download cluvfy (www)
ansible.builtin.get_url:
url: "{{ oracle_sw_source_www }}/{{ oracluvfy_archive }}"
dest: "{{ oracle_stage }}"
url: "{{ oracluvfy_archive_filesource | default(oracle_sw_source_www + '/' + oracluvfy_archive, true) }}"
dest: "{{ oracle_stage }}/{{ oracluvfy_archive }}"
mode: 0644
force: false
when:
Expand Down
8 changes: 7 additions & 1 deletion roles/orasw_meta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ The dictionary holds data for:
| Attribute | Description |
| --- | --- |
| imagename | Set an optional name for a golden Image to install from. The archiv is read from same directory as the normal installation medias from Oracle. |
| filesource | `imagename` can be replaced/overridden by `filesource` to provide an absolute path/url to the golden image (when not available in the normal installation place) |
| edition | allowed values: `SE`, `SE2`, `EE`. default value: <todo> |
| opatch_minversion | Is needed for patching. Automatically installs a new version of OPatch, when existing version is older then `opatch_minversion` |
| oracle_home | |
Expand Down Expand Up @@ -807,9 +808,12 @@ oracle_stage_remote: '{{ oracle_stage }}'

Defines the list of known Patches in `ansible-oracle`.

Patch files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
unless a `filesource` dict element provides a full path / complete URL to the patch file.

Usage of this variable:

If a complete software repository with pathches is used with a nfs-mount, this variable is not needed.
If a complete software repository with patches is used with a nfs-mount, this variable is not needed.

#### Default value

Expand All @@ -822,12 +826,14 @@ oracle_sw_patches: []
```YAML
oracle_sw_patches:
- filename: p28183653_122010_Linux-x86-64.zip
filesource: /mnt/patches/p28183653_122010_Linux-x86-64.zip
patchid: 28183653
version: 12.2.0.1
patchversion: 12.2.0.1.180717
description: GI-RU-July-2018
creates: 28183653/28163133/files/suptools/orachk.zip
- filename: p27468969_122010_Linux-x86-64.zip
filesource: https://downloadserver/patches?id=27468969
patchid: 27468969
version: 12.2.0.1
patchversion: 12.2.0.1.180417
Expand Down
8 changes: 7 additions & 1 deletion roles/orasw_meta/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ dbenvdir: "{{ oracle_user_home }}/dbenv"
# | Attribute | Description |
# | --- | --- |
# | imagename | Set an optional name for a golden Image to install from. The archiv is read from same directory as the normal installation medias from Oracle. |
# | filesource | `imagename` can be replaced/overridden by `filesource` to provide an absolute path/url to the golden image (when not available in the normal installation place) |
# | edition | allowed values: `SE`, `SE2`, `EE`. default value: <todo> |
# | opatch_minversion | Is needed for patching. Automatically installs a new version of OPatch, when existing version is older then `opatch_minversion` |
# | oracle_home | |
Expand Down Expand Up @@ -292,19 +293,24 @@ dbenvdir: "{{ oracle_user_home }}/dbenv"
# @var oracle_sw_patches:description: >
# Defines the list of known Patches in `ansible-oracle`.
#
# Patch files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
# unless a `filesource` dict element provides a full path / complete URL to the patch file.
#
# Usage of this variable:
#
# If a complete software repository with pathches is used with a nfs-mount, this variable is not needed.
# If a complete software repository with patches is used with a nfs-mount, this variable is not needed.
# @end
# @var oracle_sw_patches:example: >
# oracle_sw_patches:
# - filename: p28183653_122010_Linux-x86-64.zip
# filesource: /mnt/patches/p28183653_122010_Linux-x86-64.zip
# patchid: 28183653
# version: 12.2.0.1
# patchversion: 12.2.0.1.180717
# description: GI-RU-July-2018
# creates: 28183653/28163133/files/suptools/orachk.zip
# - filename: p27468969_122010_Linux-x86-64.zip
# filesource: https://downloadserver/patches?id=27468969
# patchid: 27468969
# version: 12.2.0.1
# patchversion: 12.2.0.1.180417
Expand Down
32 changes: 32 additions & 0 deletions roles/oraswdb_install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Install Oracle Database Software
- [hostgroup_leaf](#hostgroup_leaf)
- [hostinitdaemon](#hostinitdaemon)
- [oracle_ee_options](#oracle_ee_options)
- [oracle_sw_image_db](#oracle_sw_image_db)
- [oraswdb_install_forcechopt](#oraswdb_install_forcechopt)
- [oraswdb_install_remove_install_images](#oraswdb_install_remove_install_images)
- [ulimit_systemd_mapping](#ulimit_systemd_mapping)
Expand Down Expand Up @@ -135,6 +136,37 @@ oracle_ee_options: "{{ _oracle_ee_opiton_dict[db_homes_config[dbh.home]['version
}}"
```

### oracle_sw_image_db

Mapping for installation media for Oracle
image files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
unless a `filesource` dict element provides a full path / complete URL to the patch file.

Formerly, this dict was defined directly as vars/_oraswdb_install_oracle_sw_image_db, where it still will be copied to for compatibility reasons

#### Default value

```YAML
oracle_sw_image_db:
- {filename: LINUX.X64_213000_db_home.zip, version: 21.3.0.0, creates: install/.img.bin}
- {filename: LINUX.X64_193000_db_home.zip, version: 19.3.0.0, creates: install/.img.bin,
filesource: /mnt/software/LINUX.X64_193000_db_home.zip}
- {filename: LINUX.X64_180000_db_home.zip, version: 18.3.0.0, creates: install/.img.bin,
filesource: https://downloadserver/dbsw?version=18.3.0.0}
- {filename: linuxx64_12201_database.zip, version: 12.2.0.1, creates: database/runInstaller}
- {filename: linuxamd64_12102_database_1of2.zip, version: 12.1.0.2, creates: database/stage/sizes/oracle.server.Custom.sizes.properties}
- {filename: linuxamd64_12102_database_2of2.zip, version: 12.1.0.2, creates: database/install/.oui}
- {filename: linuxamd64_12c_database_1of2.zip, version: 12.1.0.1, creates: database/runInstaller}
- {filename: linuxamd64_12c_database_2of2.zip, version: 12.1.0.1, creates: database/runInstaller}
- {filename: p13390677_112040_Linux-x86-64_1of7.zip, version: 11.2.0.4, creates: database/install/resource/cons_zh_TW.nls}
- {filename: p13390677_112040_Linux-x86-64_2of7.zip, version: 11.2.0.4, creates: database/stage/Components/oracle.db/11.2.0.4.0/1/DataFiles/filegroup18.jar}
- {filename: p10404530_112030_Linux-x86-64_1of7.zip, version: 11.2.0.3, creates: database/readme.html}
- filename: p10404530_112030_Linux-x86-64_2of7.zip
version: 11.2.0.3
creates:
database/stage/Components/oracle.sysman.console.db/11.2.0.3.0/1/DataFiles/filegroup2.jar
```

### oraswdb_install_forcechopt

#### Default value
Expand Down
23 changes: 23 additions & 0 deletions roles/oraswdb_install/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,26 @@ glogin_default_cdb:
- "set heading on"
- "set termout on"
- "set time on"

# @var oracle_sw_image_db:description: >
# Mapping for installation media for Oracle
# image files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
# unless a `filesource` dict element provides a full path / complete URL to the patch file.
#
# Formerly, this dict was defined directly as vars/_oraswdb_install_oracle_sw_image_db, where it still will be copied to for compatibility reasons
# @end
oracle_sw_image_db:
- {filename: LINUX.X64_213000_db_home.zip, version: 21.3.0.0, creates: 'install/.img.bin'}
- {filename: LINUX.X64_193000_db_home.zip, version: 19.3.0.0, creates: 'install/.img.bin', filesource: /mnt/software/LINUX.X64_193000_db_home.zip}
- {filename: LINUX.X64_180000_db_home.zip, version: 18.3.0.0, creates: 'install/.img.bin', filesource: "https://downloadserver/dbsw?version=18.3.0.0"}
- {filename: linuxx64_12201_database.zip, version: 12.2.0.1, creates: 'database/runInstaller'}
- {filename: linuxamd64_12102_database_1of2.zip, version: 12.1.0.2, creates: 'database/stage/sizes/oracle.server.Custom.sizes.properties'}
- {filename: linuxamd64_12102_database_2of2.zip, version: 12.1.0.2, creates: 'database/install/.oui'}
- {filename: linuxamd64_12c_database_1of2.zip, version: 12.1.0.1, creates: 'database/runInstaller'}
- {filename: linuxamd64_12c_database_2of2.zip, version: 12.1.0.1, creates: 'database/runInstaller'}
- {filename: p13390677_112040_Linux-x86-64_1of7.zip, version: 11.2.0.4, creates: 'database/install/resource/cons_zh_TW.nls'}
- {filename: p13390677_112040_Linux-x86-64_2of7.zip, version: 11.2.0.4, creates: 'database/stage/Components/oracle.db/11.2.0.4.0/1/DataFiles/filegroup18.jar'}
- {filename: p10404530_112030_Linux-x86-64_1of7.zip, version: 11.2.0.3, creates: 'database/readme.html'}
- filename: p10404530_112030_Linux-x86-64_2of7.zip
version: 11.2.0.3
creates: 'database/stage/Components/oracle.sysman.console.db/11.2.0.3.0/1/DataFiles/filegroup2.jar'
4 changes: 2 additions & 2 deletions roles/oraswdb_install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@

- name: install_home_db | Transfer oracle installfiles to server (local)
ansible.builtin.copy:
src: "{{ oracle_sw_source_local }}/{{ _local_oracle_sw_image_db }}"
src: "{{ _local_oracle_sw_absolute_image_db | default(oracle_sw_source_local + '/' + _local_oracle_sw_image_db, true) }}"
dest: "{{ oracle_stage }}"
mode: 0664
force: false
Expand All @@ -131,7 +131,7 @@

- name: install_home_db | Transfer oracle installfiles to server (www)
ansible.builtin.get_url:
url: "{{ oracle_sw_source_www }}/{{ _local_oracle_sw_image_db }}"
url: "{{ _local_oracle_sw_absolute_image_db | default(oracle_sw_source_www + '/' + _local_oracle_sw_image_db, true) }}"
dest: "{{ oracle_stage }}"
mode: 0644
force: false
Expand Down
25 changes: 8 additions & 17 deletions roles/oraswdb_install/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,7 @@ _oraswdb_install_patch_upisubdir: >-
| ternary(osp_loop.unique_patchid,
| osp_loop.patchid) }}/


# Mapping for installation media for Oracle
_oraswdb_install_oracle_sw_image_db:
- {filename: LINUX.X64_213000_db_home.zip, version: 21.3.0.0, creates: 'install/.img.bin'}
- {filename: LINUX.X64_193000_db_home.zip, version: 19.3.0.0, creates: 'install/.img.bin'}
- {filename: LINUX.X64_180000_db_home.zip, version: 18.3.0.0, creates: 'install/.img.bin'}
- {filename: linuxx64_12201_database.zip, version: 12.2.0.1, creates: 'database/runInstaller'}
- {filename: linuxamd64_12102_database_1of2.zip, version: 12.1.0.2, creates: 'database/stage/sizes/oracle.server.Custom.sizes.properties'}
- {filename: linuxamd64_12102_database_2of2.zip, version: 12.1.0.2, creates: 'database/install/.oui'}
- {filename: linuxamd64_12c_database_1of2.zip, version: 12.1.0.1, creates: 'database/runInstaller'}
- {filename: linuxamd64_12c_database_2of2.zip, version: 12.1.0.1, creates: 'database/runInstaller'}
- {filename: p13390677_112040_Linux-x86-64_1of7.zip, version: 11.2.0.4, creates: 'database/install/resource/cons_zh_TW.nls'}
- {filename: p13390677_112040_Linux-x86-64_2of7.zip, version: 11.2.0.4, creates: 'database/stage/Components/oracle.db/11.2.0.4.0/1/DataFiles/filegroup18.jar'}
- {filename: p10404530_112030_Linux-x86-64_1of7.zip, version: 11.2.0.3, creates: 'database/readme.html'}
- filename: p10404530_112030_Linux-x86-64_2of7.zip
version: 11.2.0.3
creates: 'database/stage/Components/oracle.sysman.console.db/11.2.0.3.0/1/DataFiles/filegroup2.jar'
_oraswdb_install_oracle_sw_image_db: "{{ oracle_sw_image_db }}"

_oraswdb_install_oracle_directories:
- {name: "{{ oracle_stage }}", owner: "{{ oracle_user }}", group: "{{ oracle_group }}", mode: 775}
Expand Down Expand Up @@ -86,3 +70,10 @@ _local_oracle_sw_image_db: >-
| selectattr('version', 'equalto', db_homes_config[dbh.home]['version'])
| list)[0]['filename']
) }}

_local_oracle_sw_absolute_image_db: >-
{{ db_homes_config[dbh.home].filesource
| default((_oraswdb_install_oracle_sw_image_db
| selectattr('version', 'equalto', db_homes_config[dbh.home]['version'])
| list)[0]['filesource']
) }}
4 changes: 2 additions & 2 deletions roles/oraswdb_manage_patches/tasks/loop_opatch_apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

- name: loop_opatch_apply | Copy oracle DB patch (opatch) to server (local)
ansible.builtin.copy:
src: "{{ oracle_sw_source_local }}/{{ osp_loop.filename }}"
src: "{{ osp_loop.filesource | default(oracle_sw_source_local + '/' + osp_loop.filename, true) }}"
dest: "{{ oracle_stage }}/{{ osp_loop.filename }}"
mode: "0644"
force: false
Expand All @@ -46,7 +46,7 @@

- name: loop_opatch_apply | Copy oracle DB patch (opatch) to server (www)
ansible.builtin.get_url:
url: "{{ oracle_sw_source_www }}/{{ osp_loop.filename }}"
url: "{{ osp_loop.filesource | default(oracle_sw_source_www + '/' + osp_loop.filename, true) }}"
dest: "{{ oracle_stage }}/{{ osp_loop.filename }}"
mode: "0644"
force: false
Expand Down
42 changes: 23 additions & 19 deletions roles/oraswdb_manage_patches/tasks/opatch-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,15 @@

- name: db_opatch | Copy oracle opatch to server (local)
ansible.builtin.copy:
src: "{{ oracle_sw_source_local }}/{{ item.filename }}"
src: "{{ oop_loop.filesource | default(oracle_sw_source_local + '/' + oop_loop.filename, true) }}"
dest: "{{ oracle_stage }}"
mode: "0644"
force: true
with_items: "{{ oracle_opatch_patch | selectattr('version', 'equalto', db_version) }}"
loop_control:
loop_var: oop_loop
label: >-
filename: {{ oop_loop.filename | default('') }}
when:
- oracle_sw_copy
- is_sw_source_local
Expand All @@ -62,24 +66,24 @@
tags:
- oragridpatchpush

# - name: db_opatch | Copy oracle opatch to server (www)
# ansible.builtin.get_url:
# url: "{{ oracle_sw_source_www }}/{{ osp_loop.filename }}"
# dest: "{{ oracle_stage }}"
# mode: "0644"
# force: true
# with_items: "{{ oracle_opatch_patch | selectattr('version', 'equalto', db_version) }}"
# loop_control:
# loop_var: oop_loop
# label: >-
# filename: {{ oop_loop.filename | default('') }}
# when:
# - oracle_sw_copy
# - not is_sw_source_local
# become: true
# become_user: "{{ oracle_user }}"
# tags:
# - oragridpatchpush
- name: db_opatch | Copy oracle opatch to server (www)
ansible.builtin.get_url:
url: "{{ oop_loop.filesource | default(oracle_sw_source_www + '/' + oop_loop.filename, true) }}"
dest: "{{ oracle_stage }}"
mode: "0644"
force: true
with_items: "{{ oracle_opatch_patch | selectattr('version', 'equalto', db_version) }}"
loop_control:
loop_var: oop_loop
label: >-
filename: {{ oop_loop.filename | default('') }}
when:
- oracle_sw_copy
- not is_sw_source_local
become: true
become_user: "{{ oracle_user }}"
tags:
- oragridpatchpush

- name: db_opatch | Extract OPatch to DB Home
ansible.builtin.unarchive:
Expand Down
17 changes: 17 additions & 0 deletions roles/oraswgi_install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ oracle_scan_port: 1521

### oracle_sw_image_gi

List of version sepcific GI installation images

NOTE: Image files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
unless a `filesource` dict element provides a full path / complete URL to the image file.

#### Default value

```YAML
Expand All @@ -229,6 +234,18 @@ oracle_sw_image_gi:
- {filename: linuxamd64_12c_grid_2of2.zip, version: 12.1.0.1}
```

#### Example usage

```YAML
oracle_sw_image_gi:
# LINUX.X64_213000_grid_home.zip located under `oracle_sw_source_local`
- {filename: LINUX.X64_213000_grid_home.zip, version: 21.3.0.0, creates: 'install/.img.bin'}
# LINUX.X64_193000_grid_home.zip located under /mnt/images
- {filename: LINUX.X64_193000_grid_home.zip, filesource: /mnt/images/LINUX.X64_193000_grid_home.zip, version: 19.3.0.0, creates: 'install/.img.bin'}
# LINUX.X64_180000_grid_home.zip download
- {filename: LINUX.X64_180000_grid_home.zip, filesource: https://downloadserver/images?id=180000_grid_home, version: 18.3.0.0, creates: 'install/.img.bin'}
```

### oracle_vip

suffix added to hostnames for VIPs.
Expand Down
13 changes: 13 additions & 0 deletions roles/oraswgi_install/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,19 @@ oracle_asm_storage_option: "{% if oracle_install_version_gi is version('12.2', '
oracle_gi_gns_vip:

# @var oracle_sw_image_gi:description: >
# List of version sepcific GI installation images
#
# NOTE: Image files are expected to be found by their `filename` under `oracle_sw_source_local`, or `oracle_sw_source_www` respectively,
# unless a `filesource` dict element provides a full path / complete URL to the image file.
# @end
# @var oracle_sw_image_gi:example: >
# oracle_sw_image_gi:
# # LINUX.X64_213000_grid_home.zip located under `oracle_sw_source_local`
# - {filename: LINUX.X64_213000_grid_home.zip, version: 21.3.0.0, creates: 'install/.img.bin'}
# # LINUX.X64_193000_grid_home.zip located under /mnt/images
# - {filename: LINUX.X64_193000_grid_home.zip, filesource: /mnt/images/LINUX.X64_193000_grid_home.zip, version: 19.3.0.0, creates: 'install/.img.bin'}
# # LINUX.X64_180000_grid_home.zip download
# - {filename: LINUX.X64_180000_grid_home.zip, filesource: https://downloadserver/images?id=180000_grid_home, version: 18.3.0.0, creates: 'install/.img.bin'}
# @end
oracle_sw_image_gi:
- {filename: LINUX.X64_213000_grid_home.zip, version: 21.3.0.0, creates: 'install/.img.bin'}
Expand Down
Loading
Loading