All Roles from ansible-oracle.
The pages are generated from the README.md of each role, which is created by ansible-doctor.
This is the multi-page printable view of this section. Click here to print.
All Roles from ansible-oracle.
The pages are generated from the README.md of each role, which is created by ansible-doctor.
These roles are used to configure settings common to all machines
Install some generic packages
Configure ntp
Configures the host-specific Oracle settings:
Add a user & group
Create directory structures
Handle filesystem storage (partition devices, creates vg/lv and a
filesystem (ext4, xfs, btrfs) etc).
If you want to create your database
on a filesystem (instead of ASM) this is where you define the layout.
Install required OS packages
Change kernel parameters
Set up pam.d/limits config
Configures Hugepages (as a percentage of total RAM)
Disables transparent hugepages
Disables NUMA (if needed)
Configures the interconnect network (if needed)
Configures Oracle ASMLib (if needed)
Configures passwordless ssh between clusternodes if setting up RAC
(configure_cluster=True)
Uses existing ssh-keys
This role configures storage to be used by ASM.
Partitions devices (using parted)
Create ASMlib labels or sets up udev-rules for device-name persistence
This role installs and configures Oracle Restart (Grid Infrastructure for a Standalone Server). The tasks for Grid Infrastructure for a Cluster (RAC) are not tested.
Adds a .profile_grid to the oracle user
Sets up directory structures
Copies the install-files to the servers, or installs from a remote location (e.g nfs share)
Install Oracle Grid Infrastructure software and configure Oracle Restart
Out-of-Place Patching of Oracle Restart 26ai: switch into a new oracle_home_gi
This role statefully manages the lifecycle of an ASM diskgroup
Uses the oracle_asmdg module
Create/delete diskgroup.
Add/remove disks
Manage attributes for the DG
This role installs the oracle database server(s). It is possible to run more than 1 database from each home. It performs Single Instance installations (RAC installations are not tested).
Creates a .profile with the correct environment
Creates directory structures
Installs the database-server(s)
This role statefully manages the lifecycle of a database
Uses the oracle_db module
Creates/deletes: state: present/absent
Maintains archivelog/force_logging True/False
Manage patches in a GI environment
Uses the oracle_opatch module
Manages opatchauto type of patches as well as 'normal' one-offs
Statefully manage patches in a DB environment
Uses the oracle_opatch module
Manages opatchauto type of patches as well as 'normal' one-offs
Installs python-oracledb with pip, needed by the modules of ansible-oracle
Replaces the removed role cxoracle See https://python-oracledb.readthedocs.io/
Configures cron schedules if needed
Logs grow. Log rotation solves the problem of always-growing logs.
Statefully manages various aspects of the DB. They all use modules from ansible-oracle-modules
oradb-manage-pdb
oradb-manage-tablespace
oradb-manage-parameters
oradb-manage-roles
oradb-manage-users
oradb-manage-grants
oradb-manage-redo
oradb-manage-services
Meta role used by other roles to share variable defaults.
2.16.0ASM Diskgroupdefinition for Oracle Restart/Grid-Infrastructure
Failure groups (optional) per disk in disk:
failure_group: name of the failure group. Disks with the same name are in the same failure group.quorum: true for a quorum failure group (only voting files), must be the same for all disks of a failure group.Without failure_group, ASM creates a failure group for every disk.
The failure group of an existing disk is not changed.
For the initial disk group (oracle_asm_init_dg, created by gridSetup), set failure_group for all disks or for none.
asm_diskgroups: []
asm_diskgroups:
- diskgroup: crs
properties:
- {redundancy: normal}
attributes:
- {name: compatible.asm, value: 12.1.0.2.0}
- {name: compatible.rdbms, value: 11.2.0.4.0}
- {name: au_size, value: 4m}
disk:
- {device: /dev/sdc, asmlabel: crs01, failure_group: storage01}
- {device: /dev/sdd, asmlabel: crs02, failure_group: storage02}
- {device: /dev/sde, asmlabel: crs03, failure_group: nfs, quorum: true}
- diskgroup: data
properties:
- {redundancy: external}
attributes:
- {name: compatible.asm, value: 12.1.0.2.0}
- {name: compatible.rdbms, value: 11.2.0.4.0}
- {name: au_size, value: 4m}
disk:
- {device: /dev/sdf, asmlabel: data01}
- diskgroup: fra
properties:
- {redundancy: external}
attributes:
- {name: compatible.asm, value: 12.1.0.2.0}
- {name: compatible.rdbms, value: 11.2.0.4.0}
- {name: au_size, value: 4m}
disk:
- {device: /dev/sdg, asmlabel: fra01}
# Defining ausize in `properties` is still supported for backward compatibility.
# But, except for initial ASM diskgroup, it still won't be considered when creating the diskgroup, though.
asm_diskgroups:
- diskgroup: crs
properties:
- {redundancy: normal, ausize: 4}
attributes:
- {name: compatible.asm, value: 12.1.0.2.0}
- {name: compatible.rdbms, value: 11.2.0.4.0}
...
The os-group for asmadmin role in Oracle ASM.
asmadmin_group: asmadmin
The os-group for asmdba role in Oracle ASM.
asmdba_group: asmdba
The os-group for asmoper role in Oracle ASM.
asmoper_group: asmoper
Should the specified directories be on their devices -> (true), or do they live in the root-filesystem (/) -> (false). mountpoints are described in host_fs_layout
configure_host_disks: false
The os-group for sysdba role in Oracle RDBMS.
dba_group: dba
Defines the device persistency in ansible-oracle.
Values:
device_persistence: ''
device_persistence: asmlib
device_persistence: asmfd
Defines the os-User for Oracle Restart/Grid-Infrastructure, when role_separation is true.
grid_user: grid
home directory for grid_user.
Only used, when role_seperation: true which is false by default.
grid_user_home: /home/grid
The os-group for sysoper role in Oracle RDBMS.
oper_group: oper
The name for the oinstall group.
oracle_group: oinstall
Directory for central Oracle Inventory.
oracle_inventory_loc: /u01/app/oraInventory
Estimated number of background processes of an Oracle instance. Used to calculate kernel SEMMNS
oracle_nr_bg_processes: 130
Defines the directory for response files for installation.
There is usually no need to change this variable.
oracle_rsp_stage: '{{ oracle_stage }}/rsp'
(Minimum) environment settings to pass to Oracle scripts. Usually passed to shell: or command: through “environment:” keyword
_JAVA_OPTIONS is only part of the environment, when orahost_meta_java_options is not empty
(orahost_meta_java_env).
oracle_script_env: >-
{{ {'CV_ASSUME_DISTID': orahost_meta_cv_assume_distid | default('', true),
'TMPDIR': orahost_meta_tmpdir | default('', true)}
| combine(orahost_meta_java_env) }}
ulimit definition for orahost role.
oracle_seclimits:
- {name: soft nproc, value: 16384}
- {name: hard nproc, value: 16384}
- {name: soft nofile, value: 4096}
- {name: hard nofile, value: 65536}
- {name: soft stack, value: 10240}
- {name: hard stack, value: 32768}
- {name: soft memlock, value: '{{ ((0.91 * ansible_memtotal_mb) * 1024) | round | int }}'}
- {name: hard memlock, value: '{{ ((0.91 * ansible_memtotal_mb) * 1024) | round | int }}'}
Defines the base directory for response files, configuration firles etc. for ansible-oracle.
There is usually no need to change this variable.
oracle_stage: /u01/stage
Defines the temporary directory to be used by Oracle scripts. (on hardened systems, /tmp usually is noexec-flagged and thus not usable to execute scripts)
There is usually no need to change this variable.
Owner and permissions of /tmp and /var/tmp are defined by the operating system. They are never
changed by the roles, see orahost_meta_tmp_stage_os_managed.
oracle_tmp_stage: >-
{% if ansible_fips | default(false) %}{{ oracle_stage }}{%- endif %}/tmp
Defines the os-User for Oracle Database installation. Is also used as the grid owner, when role_separation is false.
oracle_user: oracle
home directory for oracle_user.
oracle_user_home: /home/oracle
The variable is used by oracle_script_env and passed
to shell: or command: through “environment:” keyword
Riles:
OL{{ ansible_distribution_major_version }}
OL8
SLES15
orahost_meta_cv_assume_distid: |-
{% if ansible_os_family == 'RedHat' %}OL
{%- if ansible_distribution_major_version is version('8', '<=') %}{{ ansible_distribution_major_version }}
{%- elif ansible_distribution_major_version is version('9', '=') %}8
{%- endif %}
{%- elif ansible_os_family in ('SuSe', 'Suse') %}SUSE{{ ansible_distribution_major_version }}
{%- endif %}
_JAVA_OPTIONS for Oracle scripts, only when orahost_meta_java_options is not empty.
Java prints Picked up _JAVA_OPTIONS: ... for every start, even for an empty value.
Oracle scripts, which parse the output of java tools, fail with this line,
e.g. root.sh of Grid Infrastructure (cluster) with CLSRSC-732 (cluutil -doesHomeExist).
orahost_meta_java_env: >-
{{ (orahost_meta_java_options | default('', true) | trim | length > 0)
| ternary({'_JAVA_OPTIONS': orahost_meta_java_options | default('', true) | trim}, {}) }}
The variable is used by oracle_script_env and passed
to shell: or command: through “environment:” keyword
orahost_meta_java_options: >-
{% if oracle_tmp_stage != '/tmp' -%}
-Djava.io.tmpdir={{ oracle_tmp_stage -}}
{% endif %}
true, when oracle_tmp_stage is /tmp or /var/tmp.
Owner and permissions of these directories are defined by the operating system (root:root, sticky bit).
The roles do not change them.
There is no need to change this variable.
orahost_meta_tmp_stage_os_managed: "{{ (oracle_tmp_stage | trim | regex_replace('/+$', '')) in ['/tmp', '/var/tmp'] }}"
orahost_meta_tmpdir: >-
{% if ansible_fips | default(false) %}{{ oracle_stage }}{%- endif %}/tmp
Minimum amount of swap space (in MB) required for DB server. Note: We observed ansible_memory_mb.swap.total is 1MB less than configured swap (e.g. 16383 instead of 16384 for 16GB)
Type: integer
orahost_min_swap_mb: 16383
SSH host key types to collect/deploy among hosts Please note, ed25519 is not supported on FIPS enabled systems and though better not collected
orahost_ssh_hostkeytypes:
- dsa
- rsa
- ecdsa
SSH key size of {{ orahost_ssh_key_type }} key
orahost_ssh_key_size: 4096
SSH key type for oracle and grid users’ SSH Keys
orahost_ssh_key_type: rsa
The state of orasw_meta_primary_node is: Single-Instance / Oracle Restart: true Cluster 1st node: true Cluster other nodes: false
Type: boolean
orasw_meta_primary_node: >
{%- if oracle_install_option_gi | default('') | upper != 'CRS_CONFIG' -%}
{%- set _orasw_meta_primary_node = true -%}
{%- elif groups[orasw_meta_cluster_hostgroup][0] == inventory_hostname -%}
{%- set _orasw_meta_primary_node = true -%}
{%- else -%}
{%- set _orasw_meta_primary_node = false -%}
{%- endif -%}
{{ _orasw_meta_primary_node }}
Should role separation be used for Oracle Restart/Grid-Infrastructure.
See grid_user and oracle_user for Grid-Infrastructure user.
role_separation: false
Folder under Oracle user home dir to place scripts in
scripts_folder: .Scripts
Force setting kernel.sem depending on configured instances (collections: oracle_databases, oracle_asm_instance), even if calculated values are lower than current ones
sysctl_kernel_sem_force: false
always
assert_ansible_oracle
license (MIT)
[Thorsten Bruhns]
Experimental: the role is under development. Breaking changes can happen at any time and are not always documented.
Install and configure Oracle Autonomous Health Framework (AHF) on database servers.
The role installs AHF from the installation media in the software repository
(AHF-LINUX_v<version>.zip or patch 30166242 downloaded with AutoUpgrade),
upgrades an existing installation when a newer version is found,
activates or deactivates the components of AHF and registers the server
as client of AHF Fleet Insights (role ahf_fleet_insights).
| Task file | Description |
|---|---|
main.yml |
Install, configure and register (or uninstall with ahf_state: absent) |
assert.yml |
Packages, check variables, Perl and owner of ahf_loc / ahf_data_dir |
install.yml |
Install or upgrade AHF |
configure.yml |
Components and settings of TFA / Compliance (orachk) |
fleet_insights_client.yml |
Register/deregister AHF Fleet Insights |
uninstall.yml |
Uninstall AHF |
See doc/guides/ahf.adoc for decisions about the installation.
2.16.0File with the settings applied by the role. Used to detect changes in
ahf_tfa_settings, ahf_compliance_settings and the registration of AHF Fleet Insights.
ahf_ansible_state_file: '{{ ahf_loc }}/oracle.ahf.ansible.json'
Timeout in seconds for interactive commands (registration of AHF Fleet Insights).
ahf_command_timeout: 300
Start the scheduler for Compliance checks (ahfctl startahf -compliance).
Default schedule of Oracle (autorun IDs, orachk -get all -id all):
| Autorun ID | AUTORUN_SCHEDULE | Checks | COLLECTION_RETENTION |
|---|---|---|---|
autostart_client_oratier1 |
3 2 * * 1,2,3,4,5,6 |
profile oratier1 |
7 days |
autostart_client |
3 3 * * 0 |
all | 14 days |
Change it with ahf_compliance_settings.
ahf_compliance_autostart: false
Requires ahf_compliance_autostart: true: the autoruns exist only with a running
Compliance scheduler (ahfctl stopahf -compliance removes them).
Settings of the Compliance autoruns per autorun ID - executed as
orachk -set "<key>=<value>;..." -id <autorun ID>.
Same behavior as ahf_tfa_settings, the settings of an ID are compared as a whole.
The settings are stored per autorun ID by AHF (e.g. AUTORUN_SCHEDULE, AUTORUN_FLAGS,
COLLECTION_RETENTION). Show them with orachk -get all -id all.
The ID is used with or without the prefix orachk. shown by orachk -get.
orachk -set requires AUTORUN_SCHEDULE (cron expression with 5 fields) in every call.
The role adds the current value, when it is not part of the settings.
A new autorun ID needs AUTORUN_SCHEDULE and AUTORUN_FLAGS.
Values must not contain ;.
ahf_compliance_settings: {}
ahf_compliance_settings:
autostart_client_oratier1:
AUTORUN_SCHEDULE: "3 2 * * 1-6"
COLLECTION_RETENTION: 7
autostart_client:
COLLECTION_RETENTION: 30
Parent directory of the AHF repository (collections, Insights reports, Compliance results).
ahf_setup creates oracle.ahf/data below this directory.
Oracle requires at least 5 GB, 10 GB are recommended.
For ahf_install_mode: root all directories in this path must be owned by root
(ahf_setup fails with AHF-00014). A directory below oracle_base or a mount point
owned by oracle_user (e.g. /u01) is not possible.
The default is ahf_loc (/opt/oracle.ahf/data), the default location of Oracle.
Use a filesystem of its own for /opt/oracle.ahf with enough space.
ahf_data_dir: "{{ '/opt' if ahf_install_mode == 'root' else oracle_base }}"
Minimum free space in MB in ahf_data_dir for a new installation.
ahf_data_dir_min_free_mb: 5120
Register the host as client of AHF Fleet Insights (ahf configuration set --type fleet-insights).
The client uploads Compliance results and TFA collections automatically.
false deregisters a client, which was registered by this role.
Requires AHF 24.9 or newer and ahf_install_mode: root.
Oracle documents the registration for clusters - check single instance environments.
ahf_fleet_insights_client: false
Register again, even when URL and user are unchanged - e.g. after a password change.
ahf_fleet_insights_force_register: false
Manage the registration in AHF Fleet Insights (ahf_fleet_insights_client).
false: the registration is not changed - no registration, no deregistration.
The state file keeps the last registration. Useful, when Fleet Insights is not reachable,
e.g. during a maintenance of the Fleet Insights server.
ahf_fleet_insights_manage: true
OS user for the REST access of Fleet Insights (ahf configuration set --os-user).
Without it the registration reports AHF-02119: ... the REST Agent was not started
(no local AHF user with the role rest-server).
Empty: --os-user is not used.
ahf_fleet_insights_os_user: '{{ oracle_user }}'
Password of ahf_fleet_insights_user. Use Ansible Vault.
ahf_fleet_insights_password: ''
Public certificate (PEM) of AHF Fleet Insights for the registration
(ahf configuration set --public-cert).
Needed for the self-signed certificate created by the installer of Fleet Insights,
otherwise the registration fails with CERTIFICATE_VERIFY_FAILED.
Role ahf_fleet_insights provides it as fact ahf_fi_public_cert or as file (ahf_fi_public_cert_fetch).
ahf_fleet_insights_public_cert: ''
ahf_fleet_insights_public_cert: "{{ lookup('ansible.builtin.file', inventory_dir + '/files/ahffi_cert.pem') }}"
Registration URL of AHF Fleet Insights.
Shown by ahffi info on the Fleet Insights server - without /ahfservice.
ahf_fleet_insights_url: ''
ahf_fleet_insights_url: https://ahffi.example.com:5005
Generic registration user of AHF Fleet Insights.
ahf_fleet_insights_user: ''
root (default): Installation as root with TFA daemon (systemd),
automatic diagnostic collections, Compliance scheduler and
AHF Fleet Insights client. Recommended by Oracle.
extract: Installation as oracle_user with ahf_setup -extract.
No daemon, no automatic collections, only on-demand usage of
orachk / tfactl as oracle_user. Settings for TFA and AHF Fleet Insights
are ignored.
ahf_install_mode: root
Filename of the AHF installation media in the software repository.
Empty (default): the newest file (modification time) matching ahf_installer_patterns
is used from oracle_sw_source_local on the Ansible controller
(is_sw_source_local: true, oracle_sw_copy: true) or from oracle_stage_remote
on the target host (oracle_sw_copy: false).
Must be set for is_sw_source_local: false (oracle_sw_source_www).
ahf_installer_archive: ''
ahf_installer_archive: AHF-LINUX_v26.10.0.zip
Filename patterns for the search of the installation media (ahf_installer_archive: "").
AHF-LINUX_v*.zip is the name of the media in My Oracle Support (Doc ID 2550798.1).
p30166242_*.zip is the patch “DOWNLOAD LATEST AHF” - e.g. downloaded by
AutoUpgrade with AHF in autoupgrade_download_patches.
ahf_installer_patterns:
- AHF-LINUX_v*.zip
- p30166242_*.zip
Version of the installation media, e.g. 26.10.0.
Normally the version is taken from the filename AHF-LINUX_v<version>.zip
(also inside of patch 30166242). Set it, when the filename does not contain the version.
ahf_installer_version: ''
Parent directory of the AHF installation.
ahf_setup creates oracle.ahf below this directory.
For ahf_install_mode: root all directories in this path must be owned by root,
because the AHF binaries are executed by root. A directory below oracle_base
is owned by oracle_user, who could replace the binaries.
This is checked by the role.
ahf_loc: "{{ '/opt' if ahf_install_mode == 'root' else oracle_base }}"
Install ahf_packages (ahf_install_mode: root only).
ahf_manage_packages: true
Packages for AHF. The package perl contains all Perl modules required by AHF
(e.g. File::Copy, FindBin, Math::BigInt, Net::Ping, AHF-00074).
perl-interpreter alone is not enough.
ahf_packages:
- perl
- openssl
- unzip
Perl for AHF (ahf_setup -perlhome), <ahf_perl_home>/bin/perl is used.
ahf_install_mode: root requires a Perl owned by root (AHF-00026).
Without -perlhome, ahf_setup uses the Perl of the Grid Infrastructure home on hosts
with Oracle Restart/RAC, which is owned by the GI owner => the default is the Perl of the OS.
Empty: ahf_setup selects the Perl.
ahf_perl_home: /usr
AHF properties - executed as ahf configuration set --property <key> --value <value>
(ahf_install_mode: root only). Same behavior as ahf_tfa_settings.
Show the supported properties with ahf configuration get --help and the current value
with ahf configuration get --property <key>. Properties of AHF 26.10:
| Property | Default | Description |
|---|---|---|
ahf.fleet-insights.upload-only-minimal-files |
true |
Upload only minimal files to Fleet Insights (not documented by Oracle) |
ahf.collectors.alert-history |
on |
Alert History, only for ASM (dismount, offline, mount) |
ahf.collectors.enhanced_os_metrics |
on |
Enhanced OS metrics |
ahf.insights.max-collection-interval |
4 |
not documented by Oracle |
ahf.compliance.excluded-check-ids |
Check IDs excluded from the Compliance checks |
ahf_properties: {}
ahf_properties:
ahf.fleet-insights.upload-only-minimal-files: "false"
ahf.collectors.alert-history: "on"
Execute all settings and component states, even when they are unchanged since the last run of the role.
ahf_settings_force: false
Additional parameters for ahf_setup.
-local is always added for ahf_install_mode: root.
AHF is installed on each host of the play. Use tfactl syncnodes for clusters.
ahf_setup_extra_args: []
ahf_setup_extra_args:
- -tmp_loc
- /var/tmp
Directory on the target host for the extraction of the installation media. The directory is removed after the installation.
ahf_stage_dir: '{{ oracle_stage }}/ahf'
present: install, upgrade and configure AHF.
absent: uninstall AHF (ahfctl uninstall -silent).
ahf_state: present
Additional directories for TFA (tfactl directory add), ahf_install_mode: root only.
TFA discovers the directories of GI, ASM, listener and databases (diag_dest) automatically
(tfactl print directories). Add directories, which are not discovered, e.g. audit files
or a log directory of an application.
| Attribute | Default | Description |
|---|---|---|
path |
directory (mandatory) | |
component |
RDBMS |
RDBMS, CRS, ASM, INSTALL, OS, CFGTOOLS, TNS, DBWLM, ACFS, IPS |
database / instance |
database and instance for component: RDBMS |
|
public |
true |
collection by all users, which can run tfactl diagcollect |
collection |
exclusions |
exclusions, noexclusions (time restrictions only) or collectall |
state |
present |
absent removes a directory added by the role |
Directories added by the role are removed, when they are removed from the list.
ahf_tfa_directories: []
ahf_tfa_directories:
- path: /u01/app/oracle/admin/DB1/adump
component: RDBMS
database: db1
instance: DB1
collection: noexclusions
Start and enable the TFA daemon (ahf_install_mode: root only).
false stops the daemon and disables the automatic start.
The software stays installed and can be used on-demand.
ahf_tfa_enabled: true
Settings for TFA - executed as tfactl set <key>=<value>
(ahf_install_mode: root only).
A setting is executed only, when it differs from the last run of the role.
The applied settings are stored in ahf_ansible_state_file.
Manual changes are not detected - use ahf_settings_force: true.
ahf_tfa_settings: {}
ahf_tfa_settings:
autodiagcollect: "OFF"
reposizeMB: 10240
minfileagetopurge: 48
ahfnotificationaddress: dba@example.com
Delete the repository in ahf_data_dir during the uninstall (-deleterepo).
ahf_uninstall_delete_repo: false
Upgrade an existing installation, when the installation media has a newer version.
ahf_upgrade: true
Verify the signature of ahf_setup with openssl and the public key
from the installation media before the installation.
ahf_verify_signature: true
license (MIT)
[Thorsten Bruhns]
Create, modify and remove Oracle Databases
2.16.0Default template name used by DBCA during execution.
dbca_templatename: General_Purpose.dbc
hostgroup_hub: '{{ hostgroup }}-hub'
Default name for LISTENER
listener_name: LISTENER
oracle_gi_cluster_type: STANDARD
Create databases with dbca -ignorePrereqFailure:
dbca executes the prerequisite checks, but failures do not stop the creation
of the database (e.g. a SCAN without DNS for RAC databases).
The default follows gi_ignoreprereq (prerequisite checks of Grid Infrastructure).
oradb_manage_db_dbca_ignore_prereq_failure: '{{ gi_ignoreprereq | default(false) }}'
always
autostartup_service
create_cdb,dotprofile_db
create_db
create_db,dbca,customdbcatemplate,dotprofile_db,listener2
create_db,dotprofile_db
customdbcatemplate
dbca
dbcatemplate
dotprofile_db
listener
listener2
listener_install
manage_db
molecule-idempotence-notest
odb_assert
psout
remove_db,dbca
responsefile_netca, listener_install
set_fact
sql_script
sqlnet
sqlnet2
switch_home
tnsnames
tnsnames2
update_oratab
license (MIT)
[Mikael Sandström]
Manage redolog groups in Oracle
2.16.0redolog
license (MIT)
Important
The description for variables is work in progress.!
Meta role used by other roles to share variable defaults.
This role has a dependency to orahost_meta.
There are a lot of variables who are used by orasw_meta
2.16.0The variable will be removed soon. The download will be changed to get_url to simplify the code.
_www_download_bin: curl
Apply Patches from db_homes_config for installed ORACLE_HOME?
This is a global switch to enable/disable DB-Patching for all ORACLE_HOMEs.
apply_patches_db: true
Switch for enable/disable assert on db_homes_config.
The assert allows only the versions 19.3.0.0 and 26.1.0.0.
false disables all checks of db_homes_config, not only the check of the version.
Please change the state only when really needed!
assert_db_homes_config: true
Enable autostart of database during system startup.
This switch is only used, when Single Instance without Grid Infrastructure / Restart is installed.
The solution is selected with autostartup_service_mode.
Default true since 5.0.0 (4.x: false).
autostartup_service: true
Interval of oracle-adopt.timer (autostartup_service_mode: units), which attaches databases
and listeners started outside of systemd to their unit. An inactive unit of a database, which
was started outside of systemd, is started.
autostartup_service_adopt_interval: 2min
Units which are required by the autostart and started before the databases and listeners
(Requires= and After=), e.g. a service which mounts the file systems of the databases.
Several units are separated by a blank.
Used by both values of autostartup_service_mode. With units, the units
network-online.target, remote-fs.target and local-fs.target are always used in After=.
autostartup_service_dependency: network.target
Solution for the autostart of databases and listeners with autostartup_service: true.
units (default since 5.0.0): one systemd unit per database (oracle-db@<ORACLE_SID>.service)
and listener (oracle-listener@<LISTENER_NAME>.service) from oracle_databases and
listener_installed, grouped by oracle-databases.target and oracle-listeners.target.
Created by oradb_manage_db.
Databases and listeners started outside of systemd are attached to their unit by the timer
oracle-adopt.timer, so they are stopped cleanly during a shutdown of the server.legacy: the solution before 5.0.0 with one service oracle-rdbms.service for all
databases in /etc/oratab. Created by oraswdb_install.Switching the mode removes the units of the other solution without stopping the databases. See the Breaking Changes guide for the migration.
autostartup_service_mode: units
Restart a database after a crash (autostartup_service_mode: units).
The unit oracle-db@<ORACLE_SID>.service monitors PMON of the database. When PMON is gone and
the last entry in the alert log is not Instance shutdown complete (or
Instance shutdown (abort) complete), the database crashed.
With true, systemd restarts the unit after autostartup_service_restart_sec
(max. 10 starts of the unit within 1 hour), with false the unit fails.
A shutdown outside of systemd (e.g. shutdown immediate or shutdown abort in sqlplus) is not restarted.
Can be set per database with autostartup_service_restart in oracle_databases.
A change is used without a restart of the database.
autostartup_service_restart: true
oracle_databases:
- oracle_db_name: DB1
autostartup_service_restart: false
RestartSec of the database units after a crash (autostartup_service_restart: true), for all databases.
autostartup_service_restart_sec: 2min
Shutdown mode of the databases (autostartup_service_mode: units): immediate, transactional, normal or abort.
autostartup_service_shutdown_mode: immediate
TimeoutStartSec of the database units (autostartup_service_mode: units).
The start of a database with crash recovery can take a long time.
autostartup_service_start_timeout: 15min
TimeoutStopSec of the database units (autostartup_service_mode: units).
systemd does not kill a database after the timeout (KillMode=process).
autostartup_service_stop_timeout: 15min
This is a central variable for ORACLE_HOME configuration.
Defines the known ORACLE_HOMEs with a lot of additional informations but not the installation itself.
See db_homes_installed for a list of installed ORACLE_HOMEs.
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: |
| opatch_minversion | Is needed for patching. Automatically installs a new version of OPatch, when existing version is older then opatch_minversion |
| oracle_home | |
| oracle_home_name | Mandatory variable, when readonly_home: true. Oracle allows only characters, numbers and ‘_’ as value in oracle_home_name. Do not use ‘-’ as a value! |
| opatchauto | Bundle patches to be installed/removed using opatchauto |
| opatch | One-off patches to be installed/removed using opatch |
| readonly_home | Should ansible-oracle install this ORACLE_HOME as readonly home? Do NOT change this attribute for an installed ORACLE_HOME. default value: false |
| version | The base version for the ORACLE_HOME. Use the version from the official 1st release of Oracle. |
See examples for allowed values.
db_homes_config:
21300_base: # 21c without patching - you should never use this in production!
home: db1_base
version: 21.3.0.0
edition: EE
19300_base: # 19c without patching - you should never use this in production!
home: db1_base
version: 19.3.0.0
edition: EE
1931_se2:
oracle_home: /u01/app/oracle/product/19.0.0/dbhome_1
version: 19.3.0.0
edition: SE2
opatch_minversion: "12.2.0.1.51"
opatchauto:
- patchid: 39062956
patchversion: 19.31.0.0.260421
state: present
path: 39062956/39062956/39036936
subpatches:
- 39034528 # Database
- 39039430 # OCW
- 39055473 # ACFS
- 39107855 # Tomcat
- 39107825 # DBWLM
apply_options:
- "-deleteInactivePatches"
opatch:
- patchid: 39473469
state: present
path: 39473469/39473469/39473469
apply_options:
- "-force_conflict"
db_homes_installed:
- home: 19300-base
apply_patches: true
state: present
Defines the standby configurations (Data Guard, Dbvisit).
Not set by default. Must be identical on all members of a configuration.
A database is assigned with standby_config in oracle_databases.
The inventory structure is described in doc/guides/standby_databases.adoc.
Type dataguard: the standby databases and the broker configuration are created
by the role oradb_standby.
IMPORTANT! Only the asserts are implemented for type dbvisit at the moment.
db_standby_config:
- name: DG1
type: dataguard
dg:
protection_mode: MaxPerformance
archivelog_deletion_policy: APPLIED ON ALL STANDBY
members:
- hosts: [dbhost1]
db_unique_name: DB1_SITE1
initial_role: primary
dg:
connect_identifier: DB1_SITE1
log_xpt_mode: ASYNC
- hosts: [dbhost2]
db_unique_name: DB1_SITE2
initial_role: physical_standby
dg:
connect_identifier: DB1_SITE2
log_xpt_mode: ASYNC
Define the directory for db environment configurations.
Used during installation of ocenv.sh.
dbenvdir: '{{ oracle_user_home }}/dbenv'
Define the passwords for DB-Users in nonCDB, CDB and PDBs.
dbpasswords: {}
nonCDB with db_name: orcl
dbpasswords:
<db_name>:
<db_user>: <db_password>
dbpasswords:
orcl:
SYS: Oracle_456
SYSTEM: Oracle_456
DBSNMP: Oracle_456
CDB with `db_name: orcl` and `PDB: orclpdb`
dbpasswords:
<CDB db_name>:
<CDB db_user>: <db_password>
<PDB name>:
<PDB db_user>: <db_password>
dbpasswords:
orcl:
SYS: Oracle_456
SYSTEM: Oracle_456
DBSNMP: Oracle_456
ORCLPDB:
PDBADMIN: Oracle_789
Set the default password for all DB-Users not defined in dbpasswords.
default_dbpass: >-
{% if item is defined and item.oracle_db_passwd is defined %}{{ item.oracle_db_passwd -}}
{%- elif dbh is defined and dbh.oracle_db_passwd is defined %}{{ dbh.oracle_db_passwd -}}
{%- endif %}
default_dbpass: topeS3cr§t
Install the ocenv.sh environment script.
Source is from: https://github.com/opitzconsulting/oracle-scripts
deploy_ocenv: true
Global switch to define if Oracle options should be changed in binary for Enterprise-Edition.
disable_ee_options: 'true'
disable_ee_options: true # change options in binary
disable_ee_options: false # do not change options in binary
PEM formatted certificate chain file to be used for SSL client authentication with ansible.builtin.get_url
Type: path
/etc/pki/ca-trust/source/anchors/client-certchain.pem
PEM formatted file that contains your private key to be used for SSL client authentication with ansible.builtin.get_url
Type: path
/etc/pki/tls/private/client-cert.pem
ORACLE_BASE for Grid Infrastructure/Restart
Important!
ORACLE_BASE for Grid-Infrastructure must be different the ORACLE_BASE for RDBMS.
ORACLE_BASE for Oracle Rstart is same as RDBMS.
grid_base: >-
{% if oracle_install_option_gi == 'CRS_CONFIG' -%}
/u01/app/grid/base{% else %}{{ oracle_base }}{% endif %}
Defines the hostgroup with nodes for a Grid-Infrastructure Cluster.
The variable needs a refactoring.
hostgroup: '{{ group_names[0] }}'
Define the http proxy for downloads
http_proxy: ''
Define the https proxy for downloads
https_proxy: ''
Mount NFS-Server for installation media?
nfs_server_sw and nfs_server_sw_path are needed, when install_from_nfs: true
install_from_nfs: false
is_sw_source_local: true
The global default port for listener when no dedicated port is configured in listener itself.
listener_port: 1521
Defines the NFS-Server used to mount the installation media from.
nfs_server_sw: nfs-server.example.com
Path to installation medias on NFS-Ser.
Important
ansible-oracle expects a fixed structure for installation media and patches!
nfs_server_sw_path: /orasw
Define no_proxy list für downlads.
no_proxy: ''
Add ocenv.sh to bashrc of oracle user?
deploy_ocenv: true is needed for the installation.
ocenv_bashrc_init: true
Define the conntents to add to .bashr when ocenv_bashrc_init: true.
ocenv_bashrc_init_section: |
echo "execute ocenv to source Oracle Environment"
alias ocenv='. "{{ dbenvdir }}/ocenv"'
When calling oracle_opatch for DB or GI, decide if analyze stage of opatch/opatchauto should be executed. Will be overridden by opatch_db_conflict_check and opatch_gi_conflict_check.
Type: boolean
opatch_conflict_check: true
Intended state of edition independent database options, as defined in {{ oracle_all_editions_options }}
oracle_all_editions_options_state:
- {option: dnfs, enabled: false}
- {option: uniaud, enabled: false}
oracle_asm_disk_string: ORCL:*
ORACLE_BASE for Oracle RDBMS
oracle_base: /u01/app/oracle
Defines the list of databases on a host.
There are diffent sub list to define Profiles, Services, Tablespaces, Users …
Attributes (selection)
| Attribute | Default | Description |
|---|---|---|
| home | key in db_homes_config (mandatory) |
|
| oracle_db_name | DB_NAME (mandatory) | |
| state | present or absent (mandatory) |
|
| is_container | true |
create a Container Database. Only true is allowed for 26ai. Set is_container: false for a non-CDB with 19c. |
| omf | true |
Oracle Managed Files (dbca -useOMF). omf: true needs db_create_file_dest and db_recovery_file_dest in init_parameters. OMF is strongly recommended. omf: false is only allowed with storage_type: FS, needs an own DBCA template without OMF (dbca_templatename) and is not tested. |
| storage_type | FS |
FS or ASM. ASM requires omf: true. |
Container Databases (is_container: true, default) need max_pdbs in init_parameters (assert)
with the number of PDBs allowed by the license: max. 3 for SE2, max. 1024 for EE.
IMPORTANT! EE allows more than 3 PDBs only with a license for the Multitenant Option.
Databases of an EE home need control_management_pack_access in init_parameters (assert)
with NONE, DIAGNOSTIC or DIAGNOSTIC+TUNING. It is optional for SE2 and must be NONE if defined.
IMPORTANT! DIAGNOSTIC needs a license for the Diagnostics Pack,
DIAGNOSTIC+TUNING for the Diagnostics and Tuning Pack.
Every database needs processes in init_parameters (assert in orahost_meta, used for kernel.sem).
Every database needs sga_target and pga_aggregate_target in init_parameters (assert).
oracle_db_mem_totalmb is not supported anymore.
With Hugepages (configure_hugepages: true, default) memory_target and memory_max_target
are not allowed in init_parameters (assert), Automatic Memory Management prevents the usage of Hugepages.
datafile_dest and recoveryfile_dest are removed from oracle_databases (assert fails),
they are replaced by db_create_file_dest and db_recovery_file_dest in init_parameters.
File destinations in dbca:
| omf | storage_type | datafile destination | recovery area destination |
|---|---|---|---|
true (default) |
FS or ASM |
db_create_file_dest in init_parameters |
db_recovery_file_dest in init_parameters |
false |
FS |
oracle_dbf_dir_fs |
oracle_reco_dir_fs |
false |
ASM |
not allowed (assert fails) |
The values in init_parameters are also used for standby databases (RMAN duplicate) and oradb_rman.
IMPORTANT! OMF is strongly recommended in ansible-oracle. Databases without OMF are not tested.
Use an own DBCA template without OMF (dbca_templatename) for omf: false.
Sub-Sections
statspack
| Attribute | Description |
|---|---|
| purgedays | Purgedays for snapshots |
| snaplevel | snaplevel used in job |
| state | create (present) or remove (absent) statspack from nonCDB, CDB or PDB |
tablespaces
Defines the Tablespace to add, drop or modify to the database.
Known limitations:
Multiple files with dedicated file names are not supported.
Use OMF instead, which is the default during creation of Tablespaces.
| Attribute | Description |
|---|---|
| name | |
| size | |
| autoextend | |
| next | |
| maxsize | |
| content | |
| state | |
| bigfile | |
| numfiles | mutually exclusive with datafile |
| datafile | mutually exclusive with numfiles |
| See examples for allowed values. |
init_parameters
Initialization parameters, managed by oradb_manage_parameters (also in oracle_pdbs).
| Attribute | Description |
|---|---|
| name | name of the parameter |
| value | value of the parameter |
| scope | both (default), spfile or memory |
| state | present, absent or reset |
| sid | instance name for the SID clause, default * (all instances). Case-sensitive, e.g. for local_listener per RAC instance. The instance does not need to run, then only the spfile is changed. |
| dbca | false: not used during creation with dbca (only oracle_databases). Default true, false for entries with sid other than *. dbca: true with sid other than * is not allowed (dbca has no SID clause). |
Single Instance databases (also with Oracle Restart) need local_listener in init_parameters, e.g. {name: local_listener, value: '//localhost:1521', scope: both, state: present}. The alias from DBCA in tnsnames.ora is missing after a switch of the ORACLE_HOME.
# IMPORTANT! This following example shows the general structure of oracle_databases.
# Do not use it as a real example.
oracle_databases:
- home: 19300-base
oracle_db_name: orcl
state: present
statspack:
purgedays: 14
snaplevel: 5
state: present
tablespaces:
- {name: system, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
init_parameters:
- {name: audit_trail, value: 'NONE', scope: spfile, state: present}
# RAC: one entry per instance
- {name: local_listener, value: 'rac1-vip:1521', scope: both, state: present, sid: orcl1}
- {name: local_listener, value: 'rac2-vip:1521', scope: both, state: present, sid: orcl2}
profiles:
- name: DEFAULT
users:
- schema: dbsnmp
oracle_databases:
- home: 19300-base
oracle_db_name: orcl
oracle_db_type: SI
storage_type: FS
oracle_database_type: MULTIPURPOSE
redolog_size: 100M
redolog_groups: 3
archivelog: false
flashback: false
force_logging: false
listener_name: LISTENER
state: present
statspack:
purgedays: 14
snaplevel: 5
state: present
tablespaces:
- {name: system, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
- {name: sysaux, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
- {name: undotbs1, size: 10M, autoextend: true, next: 50M, maxsize: 8G, content: permanent, state: present, bigfile: false}
- {name: users, size: 10M, autoextend: true, next: 50M, maxsize: 2G, content: permanent, state: present, bigfile: false}
- {name: temp, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
init_parameters:
- {name: audit_trail, value: 'NONE', scope: spfile, state: present}
- {name: control_management_pack_access, value: 'NONE', scope: both, state: present}
- {name: control_file_record_keep_time, value: '30', scope: both, state: present}
- {name: db_files, value: '200', scope: spfile, state: present}
- {name: deferred_segment_creation, value: 'false', scope: both, state: present}
- {name: filesystemio_options, value: 'setall', scope: spfile, state: present}
- {name: job_queue_processes, value: '10', scope: both, state: present}
# Disable forcing hugepages on really small systems
# - {name: use_large_pages ,value: 'ONLY', scope: spfile, state: present}
- {name: log_archive_dest_1, value: 'location=USE_DB_RECOVERY_FILE_DEST', scope: both, state: present}
- {name: log_buffer, value: '64M', scope: spfile, state: present}
- {name: pga_aggregate_target, value: '200M', scope: both, state: present, dbca: false}
- {name: sga_target, value: '1800M', scope: spfile, state: present, dbca: false}
- {name: recyclebin, value: 'off', scope: spfile, state: present}
- {name: streams_pool_size, value: '152M', scope: spfile, state: present}
- {name: "_cursor_obsolete_threshold", value: '1024', scope: spfile, state: present}
- {name: max_pdbs, value: '3', scope: both, state: present}
- {name: clonedb, value: 'true', scope: spfile, state: present, dbca: false}
- {name: db_create_file_dest, value: '/u02/oradata', scope: both, state: present}
- {name: db_create_online_log_dest_1, value: '/u02/oradata', scope: both, state: present}
- {name: db_recovery_file_dest_size, value: '10G', scope: both, state: present, dbca: false}
- {name: db_recovery_file_dest, value: '/u02/fra', scope: both, state: present}
profiles:
- name: DEFAULT
state: present
attributes:
- {name: password_life_time, value: unlimited}
users:
- schema: dbsnmp
state: unlocked
update_password: always
Datafile destination in DBCA for databases with omf: false (only storage_type: FS).
Databases with omf: true (default) use db_create_file_dest from init_parameters.
oracle_dbf_dir_fs: /u02/oradata/
Define the enabled/disabled options for 11.2 binaries.
oracle_ee_options_112:
- {option: dm, state: false}
- {option: dv, state: false}
- {option: lbac, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 12.1 binaries.
oracle_ee_options_121:
- {option: dm, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 12.2 binaries.
oracle_ee_options_122:
- {option: oaa, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 18c binaries.
oracle_ee_options_183:
- {option: oaa, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 19c binaries.
oracle_ee_options_193:
- {option: oaa, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 21c binaries.
oracle_ee_options_213:
- {option: oaa, state: false}
- {option: olap, state: false}
- {option: partitioning, state: false}
- {option: rat, state: false}
Define the enabled/disabled options for 26ai binaries.
oracle_ee_options_261:
- {option: partitioning, state: false}
- {option: rat, state: false}
Custom setting for CRS_HOME when Grid-Infrastructure is installed.
The variable is used as a default for oracle_home_gi.
Do not forget `` for Cluster installations.
oracle_home_gi_cl: /u01/app/{{ oracle_install_version_gi }}/grid
Custom setting for CRS_HOME when Oracle Restart is installed.
The variable is used as a default for the internal variable oracle_home_gi.
oracle_home_gi_so: '{{ oracle_base }}/{{ oracle_install_version_gi }}/grid'
Grid-Infrastructure nodename.
Used as hostname for all oradb_manage_-connections and as hostname in RDBMS installation.
oracle_hostname: '{{ ansible_fqdn }}'
Define the installation type for Grid Infrastructure or Oracle Restart.
| Value | Description |
|---|---|
| "" | Install Single Instance (Default) |
| CRS_CONFIG | Install Grid-Infrastructure |
| HA_CONFIG | Install Oracle Restart |
oracle_install_option_gi: ''
oracle_install_option_gi: ''
oracle_install_option_gi: CRS_CONFIG
oracle_install_option_gi: HA_CONFIG
Define the version (base release) for Grid-Infrastructure or Oracle Restart.
Important
Do not forget to set oracle_install_option_gi.
Set the version in every inventory with Grid Infrastructure or Oracle Restart.
It must match the installation media (oracle_sw_image_gi, oracle_install_image_gi).
The default is 26ai (26.1.0.0) as of 5.0.0 (19c before).
oracle_install_version_gi: 26.1.0.0
oracle_install_version_gi: 26.1.0.0
oracle_install_version_gi: 19.3.0.0
Mapping from OPatch ZIP-archive to Oracle Release.
The variable is configured for all supported Oracle Release by default.
oracle_opatch_patch:
- filename: p6880880_230000_Linux-x86-64.zip
version: 26.1.0.0
- filename: p6880880_210000_Linux-x86-64.zip
version: 21.3.0.0
- filename: p6880880_190000_Linux-x86-64.zip
version: 19.3.0.0
- filename: p6880880_180000_Linux-x86-64.zip
version: 18.3.0.0
- filename: p6880880_122010_Linux-x86-64.zip
version: 12.2.0.1
- filename: p6880880_122010_Linux-x86-64.zip
version: 12.1.0.2
- filename: p6880880_121010_Linux-x86-64.zip
version: 12.1.0.1
- filename: p6880880_112000_Linux-x86-64.zip
version: 11.2.0.4
- filename: p6880880_112000_Linux-x86-64.zip
version: 11.2.0.3
Define the list of PDBs in CDB.
Important!
For each listelement in oracle_pdbs an element in oracle_databases with cdb = oracle_db_name must exists..
Otherwise the assert for oracle_pdbs will fail!
oracle_pdbs:
- home: 19300-base
listener_port: 1521
cdb: orcl
pdb_name: ORCLPDB
state: present
statspack:
purgedays: 14
snaplevel: 7
state: present
tablespaces:
- {name: system, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
- {name: sysaux, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
- {name: undotbs1, size: 10M, autoextend: true, next: 50M, maxsize: 8G, content: permanent, state: present, bigfile: false}
- {name: users, size: 10M, autoextend: true, next: 50M, maxsize: 2G, content: permanent, state: present, bigfile: false}
- {name: temp, size: 10M, autoextend: true, next: 50M, maxsize: 4G, content: permanent, state: present, bigfile: false}
users:
# quotas: list of tablespace/size, size in bytes with optional K, M, G, T or unlimited.
# With quotas, the default_tablespace gets no automatic quota unlimited.
# quotas_mode: append (default) keeps other quotas, enforce removes them.
# size 0 removes the quota on a tablespace.
- schema: app
state: present
default_tablespace: users
quotas_mode: enforce
quotas:
- tablespace: users
size: unlimited
- tablespace: sysaux
size: 100M
Define which template is used to create .profile scripts.
Important
This variable is only used when deploy_ocenv: false. The default is true.
oracle_profile_template: dotprofile-home.j2
Recovery area destination in DBCA for databases with omf: false (only storage_type: FS).
Databases with omf: true (default) use db_recovery_file_dest from init_parameters.
oracle_reco_dir_fs: /u02/fra/
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 patches is used with a nfs-mount, this variable is not needed.
oracle_sw_patches: []
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
description: GI-RU-April-2018
creates: 27468969/27674384/README.txt
- filename: p28140658_12201180417DBAPR2018RU_Linux-x86-64.zip
patchid: 28140658
version: 12.2.0.1
patchversion: 12201180417DBAPR2018RU
description: 'PARALLEL QUERY Patch for Bug# 28140658 for Linux-x86-64 Platforms'
creates: online/files/hpatch/bug28140658.pch
Define the directory when `` is set.
The archives are directly read from this directory.
oracle_sw_source_local: /tmp
Define the URL for downloading installation medias and patches from a central server during software installation and patching.
oracle_sw_source_www: http://www/orasw
Switch for enable/disable assert on db_standby_config
and standby_config in oracle_databases.
Please change the state only when really needed!
orasw_meta_assert_db_standby_config: true
Switch for enable/disable assert on oracle_databases.
Please change the state only when really needed!
orasw_meta_assert_oracle_databases: true
Ansible Inventory hostgroup for RAC-Cluster.
orasw_meta_cluster_hostgroup: ''
Certain modules (e.g. oracle_db and oracle_opatch) rely on English language outputs. This causes trouble if system has different locale settings. That’s why we force the language in script environments.
orasw_meta_forced_lang: en_US.UTF-8
This is an internal variable for downloading patches. Usually no need to change it.
proxy_env:
http_proxy: '{{ http_proxy }}'
https_proxy: '{{ https_proxy }}'
no_proxy: '{{ no_proxy }}'
Switch to globally enable/disable linking of edition independent database options
set_oracle_all_editions_options_state: true
Define shell Aliases for oracle user.
shell_aliases:
- asmcmd='. oraenv ;rlwrap asmcmd -p'
- sqlsyso='. oraenv ;rlwrap sqlplus "/ as sysdba"'
- dgmgrl='rlwrap dgmgrl'
- rman='rlwrap rman'
- sid='export ORACLE_SID=$(ps -ef | grep "ora_pmon_$ORACLE_DBNAME" |grep -v grep | sed 's/^.*pmon_//g')'
- sqlp='rlwrap sqlplus'
- sqlsys='rlwrap sqlplus "/ as sysdba"'
- dbh='cd $ORACLE_HOME'
- dbb='cd $ORACLE_BASE'
- talert='tail -500f $ORACLE_BASE/diag/rdbms/$ORA_DB_UNQ_NAME/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
- lalert='less $ORACLE_BASE/diag/rdbms/$ORA_DB_UNQ_NAME/$ORACLE_SID/trace/alert_$ORACLE_SID.log'
- lsnrstart='lsnrctl start $LSNRNAME'
- lsnrstop='lsnrctl stop $LSNRNAME'
- lsnrstatus='lsnrctl status $LSNRNAME'
- lsnrservice='lsnrctl services $LSNRNAME'
Configure shell prompt for OS-User oracle
shell_ps1: "'[$LOGNAME'@'$ORACLE_SID `basename $PWD`]$'"
Mapping of oracle_seclimits to the limits of the systemd units for the autostart.
ulimit_systemd_mapping:
hard nproc: {name: LimitNPROC}
hard nofile: {name: LimitNOFILE}
hard stack: {name: LimitSTACK, sysctlfactor: 1024}
hard memlock: {name: LimitMEMLOCK, sysctlfactor: 1024}
Enable Proxy for Download
use_proxy: false
always
assert_ansible
Assert version of Ansible Core
assert_ansible_oracle
Assert inventory variables from ansible-oracle
nfsmountdb
nfsumountdb
_oraswgi_meta_configure_clusterlicense (MIT)
[Thorsten Bruhns]
Install Grid Infrastructure / ORacle Restart software.
This role has a dependency to orahost_meta and orasw_meta for default parameter.
Known Issues from Oracle:
2.16.0Name of RPM for cvuqdisk.
RPM is installed from {{ oracle_home_gi }}/cv/rpm/
cvuqdisk_rpm: cvuqdisk-1.0.10-1.rpm
default_dbpass: '{% if item.0.oracle_db_passwd is defined %}{{ item.0.oracle_db_passwd }}{% else %}Oracle123{% endif %}'
Default password for Grid-Infrastructure and ASM-Users.
Important
It is mandatory to set this variable in your inventory!
default_gipass: ''
Port for SCAN-Listener
false => Do not ignore failed runcluvfy.sh true => Ignore failed runcluvfy.sh
gi_ignoreprereq: false
1st Diskgroup where ASM SPFile is placed.
oracle_asm_init_dg: crs
oracle_asm_storage_option: "{% if oracle_install_version_gi is version('12.2', '>=') %}FLEX_ASM_STORAGE{% else %}LOCAL_ASM_STORAGE{% endif %}"
Create _MGMTBD on cluster.
oracle_cluster_mgmdb: false
Name of Grid-Infrastructure Cluster.
The maximum length allowed for clustername is 63 characters. The name can be any combination of lower and uppercase alphabets (A - Z), (0 - 9) and hyphens (-).
Only set this variable, when orasw_meta_cluster_hostgroup contains a ‘_’.
Important! Ansible hostgrouds could not contain a ‘-’ in name!
oracle_cluster_name: '{{ orasw_meta_cluster_hostgroup }}'
Define clusterware type.
oracle_gi_cluster_type: STANDARD
Define ths GNS subdomain for Cluster
Define GNS VIP for Clusterware.
oracle_gi_gns_vip:
Name of private network interface.
oracle_gi_nic_priv: eth1
Name of public network interface.
oracle_gi_nic_pub: eth0
Defines the network for the interconnect.
Important!
Only used, when configure_interconnect=true and ansible_os_family='RedHat' during cluster installations.
oracle_ic_net: 3.3.3.{{ ansible_all_ipv4_addresses[0].split(".")[-1] }}
SCAN DNS-Name
oracle_scan_port: 1521
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.
oracle_sw_image_gi:
- {filename: LINUX.X64_2326100_grid_home.zip, version: 26.1.0.0, creates: install/.img.bin}
- {filename: LINUX.X64_213000_grid_home.zip, version: 21.3.0.0, creates: install/.img.bin}
- {filename: LINUX.X64_193000_grid_home.zip, version: 19.3.0.0, creates: install/.img.bin}
- {filename: LINUX.X64_180000_grid_home.zip, version: 18.3.0.0, creates: install/.img.bin}
- {filename: linuxx64_12201_grid_home.zip, version: 12.2.0.1, creates: xdk/mesg/lsxja.msb}
- {filename: linuxamd64_12102_grid_1of2.zip, version: 12.1.0.2, creates: grid/stage/sizes/oracle.crs.12.1.0.2.0.sizes.properties}
- {filename: linuxamd64_12102_grid_2of2.zip, version: 12.1.0.2, creates: grid/install/.oui}
- {filename: linuxamd64_12c_grid_1of2.zip, version: 12.1.0.1}
- {filename: linuxamd64_12c_grid_2of2.zip, version: 12.1.0.1}
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'}
suffix added to hostnames for VIPs.
{{ ansible_hostname }}{{ oracle_vip }}
Important!
oracle_node_vip defines a fixed hostname for the VIP.
That replaces the logic from oracle_vip for the VIP!
oracle_vip: -vip
Remove obsolete Grid Infrastructure homes of Oracle Restart with deinstall.
Obsolete homes are all Grid Infrastructure homes in the central inventory
except crs_home in /etc/oracle/olr.loc and oracle_home_gi,
e.g. the old home after an Out-of-Place Patching.
The removal is done only, when Oracle Restart runs from oracle_home_gi and
deinstall -checkonly reports the home as not configured.
Homes, which are not registered in the central inventory, are not touched.
oraswgi_install_remove_obsolete_homes: false
Run configtoolcommand during installation.
Do not disable this!
run_configtoolallcommand: true
always
asmfd
crsctl
cvuqdisk
directories
dsset
glogingi
nfsmountdb
nfsumountdb
opatchls
oragridinstall
oragridsw
oragridswunpack
responsefileconfigtool
responsefilegi
runcluvfy
runconfigtool
runroot
updatenodelist
license (MIT)
Mikael Sandström, Thorsten Bruhns
Experimental: the role is under development. Breaking changes can happen at any time and are not always documented.
Install Oracle AHF Fleet Insights as central web interface for the evaluation of AHF data (Compliance results, TFA collections, Insights) from many database servers.
The AHF clients (role ahf with ahf_fleet_insights_client: true) upload
their data to Fleet Insights. The database servers are not contacted
for the evaluation.
Fleet Insights requires a repository database (19c or newer) with the
schema user from create_db_user.sql of the installation media.
Fleet Insights has no systemd unit, its processes are started by cron entries of
ahf_fi_install_user. The role starts Fleet Insights (ahffi start), when it is not running,
and waits for the web application on ahf_fi_port.
See doc/guides/ahf.adoc.
2.16.0Validity of the generated certificate in days.
ahf_fi_cert_days: 730
Own certificate (PEM) for Fleet Insights on the Ansible controller, e.g. from an internal CA.
Imported with ahffi importcert together with ahf_fi_cert_key_file.
Empty: ahf_fi_cert_generate is used.
ahf_fi_cert_file: ''
Create a self-signed certificate with Subject Alternative Names (ahf_fi_cert_names)
and import it with ahffi importcert.
The certificate of the installer has no Subject Alternative Name. The AHF clients
(AHF 26.x) check only the SAN and reject it with
CERTIFICATE_VERIFY_FAILED ... Hostname mismatch.
Ignored, when ahf_fi_cert_file is set.
ahf_fi_cert_generate: true
Private key (PEM) of ahf_fi_cert_file on the Ansible controller.
ahf_fi_cert_key_file: ''
DNS names for the Subject Alternative Name of the generated certificate.
The clients must use one of them in ahf_fleet_insights_url.
The first name is the CN.
ahf_fi_cert_names: '{{ [ansible_hostname, ansible_fqdn] | unique }}'
Path to clamscan for a virus scan of the uploaded collections (CLAMSCAN).
Increases the processing time.
ahf_fi_clamscan: ''
Hostname of the repository database (DB_HOST). Oracle Database 19c or newer.
ahf_fi_db_host: '{{ inventory_hostname }}'
Password of ahf_fi_db_user (DB_PASSWORD). Use Ansible Vault.
ahf_fi_db_password: ''
Listener port of the repository database (DB_PORT).
ahf_fi_db_port: 1521
Service name of the repository database (DB_SERVICE).
ahf_fi_db_service: ''
Schema user in the repository database (DB_USER).
Create it with create_db_user.sql from the installation media.
ahf_fi_db_user: AHFFI
Wallet for the connection to the repository database (DB_WALLET).
ahf_fi_db_wallet: ''
Open ahf_fi_port in firewalld, when firewalld is running.
ahf_fi_firewall: true
Installation directory of Fleet Insights (INSTALL_DIR).
Plan 4 GB per registered cluster.
ahf_fi_install_dir: '{{ oracle_base }}/ahffi'
OS user for the installation and the processes of Fleet Insights.
The installer fails with root.
ahf_fi_install_user: '{{ oracle_user }}'
Filename of the installation media in the software repository (My Oracle Support Doc ID 3043060.1).
Empty (default): the newest file matching AHFFI-LINUX_v*.zip is used from
oracle_sw_source_local on the Ansible controller or from oracle_stage_remote
(oracle_sw_copy: false). Must be set for oracle_sw_source_www.
ahf_fi_installer_archive: ''
ahf_fi_installer_archive: AHFFI-LINUX_v25.2.0.zip
Directory of Oracle Instant Client (INSTANT_CLIENT).
ahf_fi_instant_client: /usr/lib/oracle/23/client64
Yum repository for Oracle Instant Client on Oracle Linux. Empty: no repository is configured.
ahf_fi_instantclient_repo: >-
https://yum.oracle.com/repo/OracleLinux/OL{{ ansible_distribution_major_version }}/oracle/instantclient23/x86_64/
Java home (Java 22 or newer) for Fleet Insights (JAVA_HOME).
Empty (default): the newest Oracle JDK in /usr/lib/jvm/jdk-*-oracle-x64 is used.
The Oracle JDK RPM installs into a directory with the full version,
e.g. /usr/lib/jvm/jdk-25.0.5.0.3-oracle-x64, which changes with every update.
ahf_fi_java_home: ''
Install the required packages (ahf_fi_packages) and the yum repository
for Oracle Instant Client (ahf_fi_instantclient_repo).
ahf_fi_manage_packages: true
Packages for Fleet Insights: cronie, iproute, hostname, Java 22 or newer and Oracle Instant Client Basic + SQL*Plus.
The Oracle JDK is used under the Oracle No-Fee Terms and Conditions (NFTC).
ahf_fi_packages:
- cronie
- iproute
- hostname
- https://download.oracle.com/java/25/latest/jdk-25_linux-x64_bin.rpm
- oracle-instantclient-basic
- oracle-instantclient-sqlplus
Port of the web application (WEBAPP_PORT, 1024 - 49151).
Must be reachable from all AHF clients and the browsers.
ahf_fi_port: 5005
Path on the Ansible controller for the public certificate of Fleet Insights
(<ahf_fi_install_dir>/ahf_service/certs/cert.pem, self-signed by the installer).
The AHF clients need it for the registration (role ahf: ahf_fleet_insights_public_cert).
The certificate is also available as fact ahf_fi_public_cert.
Empty: the certificate is not fetched.
ahf_fi_public_cert_fetch: ''
ahf_fi_public_cert_fetch: "{{ inventory_dir }}/files/ahffi_cert.pem"
Password of ahf_fi_registration_user (GENERIC_REGISTRATION_PASSWORD).
At least 8 characters with a digit, a special character and an uppercase letter.
Use Ansible Vault.
ahf_fi_registration_password: ''
Generic registration user for the AHF clients (GENERIC_REGISTRATION_USER).
Created by the installer, when user and password are set.
ahf_fi_registration_user: ''
Directory on the target host for the installation media. The directory is removed after the installation, because the properties file contains passwords.
ahf_fi_stage_dir: '{{ oracle_stage }}/ahffi'
Seconds to wait for the web application on ahf_fi_port after the installation or start.
The role starts Fleet Insights (ahffi start), when ahffi status does not report it as running.
ahf_fi_start_timeout: 300
Patch an existing installation, when the installation media has a newer version.
ahf_fi_upgrade: true
Verify the signature of the installation media with openssl.
ahf_fi_verify_signature: true
license (MIT)
[Thorsten Bruhns]
Meta role used to store internal variables from ansible-oracle.
Do not use any of the variables in your inventory!
This will create issues and problems in ansible-oracle and is not supported.
2.16.0The variable is internal used only.
Do not set it in inventory!
_db_password_cdb: _internal_used_
The variable is internal used only.
Do not set it in inventory!
_db_password_pdb: _internal_used_
The variable is internal used only.
Do not set it in inventory!
_db_service_name: _internal_used_
The variable is internal used only.
Do not set it in inventory!
Get the service_name for a PDB.
Requires opdb as loop_var.
_db_service_pdb: _internal_used_
The variable is internal used only.
Do not set it in inventory!
get db_unique_name from CDB for current pdb
Requires opdb as loop_var.
_db_unique_name_for_pdb: _internal_used_
The variable is used for shell, command tasks to set environment Variables.
Do not set it in inventory!
_grid_env:
ORACLE_HOME: '{{ oracle_home_gi }}'
LD_LIBRARY_PATH: '{{ oracle_home_gi }}/lib'
The variable is internal used only.
Do not set it in inventory!
_listener_port_cdb: _internal_used_
The variable is internal used only.
Do not set it in inventory!
_listener_port_pdb: _internal_used_
The variable is internal used only.
Do not set it in inventory!
_odb_loop_helper: _internal_used_
The variable is internal used only.
Do not set it in inventory!
RMAN CONFIGURE ARCHIVELOG DELETION POLICY TO <value> of the current member:
archivelog_deletion_policy of the member or of the configuration (mandatory, checked by orasw_meta).
_odb_standby_archivelog_deletion_policy: _internal_used_
The variable is internal used only.
Do not set it in inventory!
Entry of db_standby_config referenced by standby_config of the current database
(_odb_loop_helper). Empty dictionary for a database without standby_config.
_odb_standby_config: _internal_used_
The variable is internal used only.
Do not set it in inventory!
Method for the creation of the standby database of the current member:
create_method of the member, of the configuration or rman_duplicate_active.
_odb_standby_create_method: _internal_used_
The variable is internal used only.
Do not set it in inventory!
Member of _odb_standby_config for the current database and host:
member with inventory_hostname in hosts, db_unique_name decides when more than 1 member matches.
Empty dictionary when no or more than 1 member matches (checked by the asserts in orasw_meta).
_odb_standby_member: _internal_used_
The variable is internal used only.
Do not set it in inventory!
All other members of _odb_standby_config (without _odb_standby_member).
_odb_standby_others: _internal_used_
_opdb_home: "{{ (oracle_databases | selectattr('oracle_db_name', 'equalto', _opdb_loop_helper['cdb']))[0]['home'] }}"
The variable is internal used only.
Do not set it in inventory!
_opdb_loop_helper: _internal_used_
Defines linkable options available for all editions of oracle database (e.g. Unified auditing, DirectNFS) Dictionary key (dnfs, uniaud, etc.), suffixed by _on/_off, must match the make target in {{ oracle_home_db }}/rdbms/lib/ins_rdbms.mk match_file: File relative to {{ oracle_home_db }} where to grep for current state of the option enabled_matches: Pattern that matches in match_file if option currently is enabled
The variable is internal used only.
Do not set it in inventory!
_oracle_db_instance_name: _internal_used_
The variable is internal used only.
Do not set it in inventory!
_oracle_db_unique_name: _internal_used_
This is an internal variable in ansible-oracle.
IMPORTANT
Do not set this variable in inventory, set_fact …!
_oracle_ee_opiton_dict:
11.2.0.4: '{{ oracle_ee_options_112 }}'
12.1.0.1: '{{ oracle_ee_options_121 }}'
12.1.0.2: '{{ oracle_ee_options_121 }}'
12.2.0.1: '{{ oracle_ee_options_122 }}'
18.3.0.0: '{{ oracle_ee_options_183 }}'
19.3.0.0: '{{ oracle_ee_options_193 }}'
21.3.0.0: '{{ oracle_ee_options_213 }}'
26.1.0.0: '{{ oracle_ee_options_261 }}'
This is an internal variable in ansible-oracle.
Maps the chopt option names from oracle_ee_options_* to the make target
in $ORACLE_HOME/rdbms/lib/ins_rdbms.mk (suffixed by _on/_off) and
to the object in libknlopt.a, which is present when the option is enabled.
All options are linked by one make call with a single ioracle at the end.
IMPORTANT
Do not set this variable in inventory, set_fact …!
_oracle_ee_options_link:
oaa:
make_target: dm
match_file: rdbms/lib/libknlopt.a
enabled_matches: \bdmwdm\.
olap:
make_target: olap
match_file: rdbms/lib/libknlopt.a
enabled_matches: \bxsyeolap\.
partitioning:
make_target: part
match_file: rdbms/lib/libknlopt.a
enabled_matches: \bkkpoban\.
rat:
make_target: rat
match_file: rdbms/lib/libknlopt.a
enabled_matches: \bkecwr\.
This is an internal variable in ansible-oracle.
Options from _oracle_ee_options_link, which are valid for a release.
Same as the options in $ORACLE_HOME/bin/chopt.ini.
26ai has no oaa and olap anymore.
IMPORTANT
Do not set this variable in inventory, set_fact …!
_oracle_ee_options_valid:
19.3.0.0: [oaa, olap, partitioning, rat]
21.3.0.0: [oaa, olap, partitioning, rat]
26.1.0.0: [partitioning, rat]
The variable is used for shell, command tasks to set environment Variables.
Do not set it in inventory!
_oracle_env:
ORACLE_HOME: '{{ _oracle_home_db }}'
LD_LIBRARY_PATH: '{{ _oracle_home_db }}/lib'
_oracle_env_pdb:
ORACLE_HOME: '{{ _oracle_home_db_pdb }}'
LD_LIBRARY_PATH: '{{ _oracle_home_db_pdb }}/lib'
This is an internal variable in ansible-oracle.
Do not set it in inventory!
_oracle_home_db: _internal_used_
_oracle_home_db_pdb: "{{ db_homes_config[_opdb_home]['oracle_home'] }}"
The variable is internal used only.
Do not set it in inventory!
ORACLE_SID of the current database (_odb_loop_helper).
_orasw_meta_standby_sid: _internal_used_
cluster_master: '{{ ansible_play_batch[0] }}'
db_mode: sysdba
db_password: >-
{% if dbpasswords is defined
and dbpasswords[item.oracle_db_name] is defined
and dbpasswords[item.oracle_db_name][db_user] is defined -%}
{{- dbpasswords[item.oracle_db_name][db_user] }}
{%- else %}{{ default_dbpass }}
{%- endif %}
Deprecated: since v4.0.0
db_service_name: '{% if item is defined -%} {%- if item.oracle_db_unique_name is defined -%}{{ item.oracle_db_unique_name }}{%- elif item.oracle_db_instance_name is defined -%}{{ item.oracle_db_instance_name }}{%- else -%}{{ item.oracle_db_name }}{%- endif -%}{%- endif %}'
db_user: sys
This is an internal variable in ansible-oracle.
IMPORTANT
Do not set this variable in inventory, set_fact …!
Deprecated: since v4.0.0
db_version: _unset_
The variable is used for shell, command tasks to set environment Variables.
Do not set it in inventory!
Deprecated: since v4.0.0
grid_env:
ORACLE_HOME: '{{ oracle_home_gi }}'
LD_LIBRARY_PATH: '{{ oracle_home_gi }}/lib'
Deprecated: since v4.0.0
listener_home: "{%- if lsnrinst is defined -%}{%- if db_homes_config[lsnrinst.home]['oracle_home'] is defined -%}{{ db_homes_config[lsnrinst.home]['oracle_home'] }}{%- else -%}{{ oracle_base }}/{{ db_homes_config[lsnrinst.home]['version'] }}/{{ db_homes_config[lsnrinst.home]['home'] }}{%- endif -%}{%- endif -%}"
Deprecated: since v4.0.0
listener_port_template: '{% if item.listener_port is defined %}{{ item.listener_port }}{% else %}{{ listener_port }}{% endif %}'
Deprecated: since v4.0.0
listener_protocols: TCP
ocm_response_file: '{{ oracle_patch_stage }}/{{ db_version }}/ocm.rsp'
oracle_all_editions_options:
26.1.0.0: &261_all_editions_options
dnfs:
match_file: rdbms/lib/odm/libnfsodm??.so
enabled_matches: .*
uniaud:
match_file: rdbms/lib/libknlopt.a
enabled_matches: \bkzaiang\.
21.3.0.0:
<<: *261_all_editions_options
19.3.0.0:
<<: *261_all_editions_options
18.3.0.0:
<<: *261_all_editions_options
12.2.0.1:
<<: *261_all_editions_options
12.1.0.2:
<<: *261_all_editions_options
12.1.0.1:
<<: *261_all_editions_options
11.2.0.4: &1124_all_editions_options
dnfs:
match_file: rdbms/lib/odm/libnfsodm??.so
enabled_matches: .*
11.2.0.3:
<<: *1124_all_editions_options
The variable is used for shell, command tasks to set environment Variables.
Do not set it in inventory!
Deprecated: since v4.0.0
oracle_env:
ORACLE_HOME: '{{ oracle_home_db }}'
LD_LIBRARY_PATH: '{{ oracle_home_db }}/lib'
The variable is used for shell, command tasks to set environment Variables.
Do not set it in inventory!
Deprecated: since v4.0.0
oracle_env_lsnrctl:
ORACLE_BASE: '{{ oracle_base }}'
ORACLE_HOME: '{{ listener_home }}'
LD_LIBRARY_PATH: '{{ listener_home }}/lib'
PATH: '{{ listener_home }}/bin:$PATH:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin'
This is an internal variable in ansible-oracle.
The variable is deprecated and removed in a future version.
IMPORTANT
Do not set this variable in inventory, set_fact …!
Deprecated: since v4.0.0
oracle_home_db: _unset_
Custom setting for CRS_HOME.
The default value depends on _oraswgi_meta_configure_cluster and oracle_home_gi_cl or oracle_home_gi_so.
oracle_home_gi: '{% if oracle_install_version_gi is defined -%}{%- if _oraswgi_meta_configure_cluster -%}{{ oracle_home_gi_cl }}{%- else -%}{{ oracle_home_gi_so }}{%- endif -%}{%- endif %}'
oracle_patch_install: '{% if not oracle_sw_copy | bool and not oracle_sw_unpack | bool %}{{ oracle_patch_stage_remote }}{% else %}{{ oracle_patch_stage }}{% endif %}'
oracle_patch_stage: '{{ oracle_stage }}/patches'
oracle_patch_stage_remote: '{{ oracle_stage_remote }}/patches'
This is an internal variable. Do not set it in Inventory.
oracle_stage_install: '{% if not oracle_sw_copy | bool and not oracle_sw_unpack | bool %}{{ oracle_stage_remote }}{% else %}{{ oracle_stage }}{% endif %}'
oracle_sw_copy: '{{ not (install_from_nfs | bool) }}'
oracle_sw_extract_path: "{%- if '18' in db_version -%}{{ oracle_home_db }}{%- else -%}{{ oracle_stage }}/{{ item[0].version }}{%- endif -%}"
oracle_sw_unpack: '{{ not (install_from_nfs | bool) }}'
None.
license (MIT)
[Thorsten Bruhns]
Install Oracle Database Software
2.16.0Force linking of all options from oracle_ee_options and
oracle_all_editions_options_state in ORACLE_HOME.
The current state of an option is read from the libraries in
ORACLE_HOME. Only options not in intended state are linked, all of them
in one make call with a single relink of oracle (ioracle).
true links all options, even when they are already in intended state.
Create .profile_-environment scripts for databases
in oracle_databases.
Mandatory when listener_installed is defined,
autostartup_service: true and autostartup_service_mode: legacy.
Otherwise the listener will not start!
configure_oracle_profile: true
content of glogin.sql for CDB/PDB databases
glogin_default_cdb:
- define gname=idle
- column global_name new_value gname
- set heading off
- set termout off
- col global_name noprint
- select upper(sys_context ('userenv', 'instance_name') || ':' || sys_context('userenv', 'con_name')) global_name from dual;
- set sqlprompt '_user @ &gname:>'
- set heading on
- set termout on
- set time on
glogin_default_nocdb:
- set sqlprompt "_user @ _connect_identifier:>"
- set time on
hostgroup: '{{ group_names[0] }}'
hostgroup_hub: '{{ hostgroup }}-hub'
hostgroup_leaf: '{{ hostgroup }}-leaf'
The start daemon of the OS.
Usually no need to change this value!
hostinitdaemon: '{{ ansible_service_mgr }}'
oracle_ee_options: "{{ _oracle_ee_opiton_dict[db_homes_config[dbh.home]['version']] }}"
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
oracle_sw_image_db:
- {filename: LINUX.X64_2326100_db_home.zip, version: 26.1.0.0, creates: install/.img.bin}
- {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
oracle_sw_image_db:
- {filename: LINUX.X64_2326100_db_home.zip, version: 26.1.0.0, creates: 'install/.img.bin'}
- {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: false
Remove installation media from staging after installation when oracle_sw_copy: true.
oraswdb_install_remove_install_images: true
always
assert
autostartup_service
checkdbswinstall
create_db,dotprofile_db
dbchopt
directoriesdb
existing_dbhome
glogindb
install_home
nfsmountdb
nfsumountdb
opatchls
oradbinstall
oradbinstall,dbchopt
oradbsw
oradbswunpack
orainst
responsefileswdb
roohctl
runroot
seclimit
license (MIT)
[Mikael Sandström]
Oracle RMAN Backup for ansible-oracle
Please use only oradb_rman_ variables from role oradb_rman.
All other role variables from oradb_rman are deprecated and will be removed in a future release.
2.16.0Assert control_file_record_keep_time in init_parameters of databases with rman_jobs
(state: present, sid: '*').
With the retention policy RECOVERY WINDOW OF <n> DAYS the value must be >= <n>.
Otherwise the controlfile reuses the records of backups, which are needed by RMAN without catalog.
oradb_rman_assert_control_file_record_keep_time: true
Configure autofs for RMAN Backups?
oradb_rman_autofs: '{{ rmanautofs | default(false) }}'
Defines the format for disk target in RMAN-Templates from role.
Used for CONFIGURE CHANNEL DEVICE TYPE DISK <value> => the value starts with format.
oradb_rman_channel_disk_default: >-
{% set __channel_disk_default = "format '/u10/rmanbackup/%d/%d_%T_%U'" -%}
{{ rman_channel_disk_default | default(__channel_disk_default) -}}
Defines the contolfile autobackup target directory for the RMAN-Templates from role.
oradb_rman_controlfile_autobackup_disk_default: >-
{% set __autobackup_disk_default = "'/u10/rmanbackup/%d/%d_%F'" -%}
{{ rman_controlfile_autobackup_disk_default | default(__autobackup_disk_default) -}}
Add mk-job to all cronjobs in /etc/cron.d for RMAN backups.
This is only needed when RMAN backups are monitored by checkmk.
oradb_rman_cron_mkjob: '{{ rman_cron_mkjob | default(false) }}'
Name for file for crontab in /etc/cron.d
oradb_rman_cronfile: oracle_rman_ansible
Lgofiledirectory for rman_wrapper.sh.
oradb_rman_log_dir: "{{ rman_log_dir | default((odb.0 | default(odb)).rman_log_dir | default(oracle_base + '/rman/log')) }}"
Days to keep the logfiles of rman_backup.sh in oradb_rman_log_dir (RMAN_LOG_RETENTION).
rman_backup.sh writes one logfile per execution and removes the logfiles
of the database and action, which are older than this number of days.
0 keeps all logfiles.
oradb_rman_log_retention: 30
Defines the policy for the RMAN-Templates from role.
oradb_rman_retention_policy_default: "{{ rman_retention_policy_default | default('RECOVERY WINDOW OF 14 DAYS') }}"
Directory for *.rman-Files.
oradb_rman_script_dir: "{{ rman_script_dir | default((odb.0 | default(odb)).rman_script_dir | default(oracle_base + '/rman')) }}"
TNS_ADMIN for rman_wrapper.sh.
This is needed for RMAN-Catalogconnections.
oradb_rman_tns_admin: "{{ rman_tns_admin | default(oracle_base + '/rman/network/admin') }}"
Defines custom entries in tnsnames.ora in oradb_rman_tns_admin.
Format is same as tnsnames_installed.
oradb_rman_tnsnames_installed:
- home: db19-si-ee
tnsname: orclpdb
state: present
Directory for Oracle wallet.
oradb_rman_wallet_loc: "{{ rman_wallet_loc | default(oracle_base + '/rman/network/wallet') }}"
Password for Orale wallet.
oradb_rman_wallet_password: "{{ rman_wallet_password | default('oracleWallet1') }}"
always
assert
assert_rman_tns_admin
autofs
notest
rmancfg
rmancopy
rmancron
rmanexecute
rmanregister
tns
wallet
wallet_contents
license (MIT)
[Thorsten Bruhns]
Creates standby databases for the standby configurations in db_standby_config.
The method for the creation is selected with create_method in db_standby_config:
rman_duplicate_active: RMAN DUPLICATE ... FOR STANDBY FROM ACTIVE DATABASE (default)external: the standby database is created outside of ansible-oraclecustom: tasks file from create_tasks_fileThe inventory structure is described in doc/guides/standby_databases.adoc.
2.16.0Create the Data Guard Broker configuration with dgmgrl.cfg on the host of the primary database,
when no broker configuration exists and all other members are physical standby databases.
false: dgmgrl.cfg is created on all members, but not executed.
oradb_standby_broker_create: true
Use USING COMPRESSED BACKUPSET for DUPLICATE ... FROM ACTIVE DATABASE.
false uses USING BACKUPSET.
oradb_standby_rman_compressed: true
Directory for the logfiles of RMAN DUPLICATE.
oradb_standby_rman_logdir: '{{ oracle_base }}/cfgtoollogs/oradb_standby'
Number of RMAN channels on the primary and on the standby database
for create_method: rman_duplicate_active.
oradb_standby_rman_parallel: 2
Start Redo Apply (RECOVER MANAGED STANDBY DATABASE DISCONNECT) after the creation
of the standby database.
oradb_standby_start_apply: true
oradb_standby
license (MIT)
sets up the host generic stuff
2.16.0This is an internal variable only. Do not define it!
common_packages: _unset_
List of RPMs for RHEL10 or OL10
common_packages_el10:
- bc
- binutils
- elfutils-libelf
- fontconfig
- glibc
- glibc-devel
- ksh
- libaio
- libgcc
- libibverbs
- libstdc++
- libvirt-libs
- libxcb
- libX11
- libXau
- libXi
- libXrender
- libXtst
- libxcrypt-compat
- make
- policycoreutils
- policycoreutils-python-utils
- smartmontools
- sysstat
- xz-devel
- acl
- autofs
- bind-utils
- ethtool
- expect
- git
- grubby
- initscripts
- libaio-devel
- libnsl
- libstdc++-devel
- lsof
- lvm2
- module-init-tools
- nc
- net-tools
- nfs-utils
- openssh-clients
- pam
- parted
- procps
- psmisc
- python3
- python3-pip
- python3-packaging
- rlwrap
- tar
- unzip
- util-linux-ng
- xfsprogs
List of RPMs for RHEL6 or OL6
common_packages_el6:
- screen
- facter
- procps
- module-init-tools
- ethtool
- lsof
- bc
- nc
- bind-utils
- nfs-utils
- make
- sysstat
- unzip
- openssh-clients
- compat-libcap1
- collectl
- rlwrap
- tigervnc-server
- ntp
- expect
- git
- lvm2
- xfsprogs
- btrfs-progs
- tmux
- python-devel
- python-pip
- libselinux-python
- twm
- autofs
- parted
- ksh
List of RPMs for RHEL7 or OL7
common_packages_el7:
- screen
- facter
- procps
- module-init-tools
- ethtool
- lsof
- bc
- nc
- bind-utils
- nfs-utils
- make
- sysstat
- unzip
- openssh-clients
- compat-libcap1
- collectl
- rlwrap
- tigervnc-server
- ntp
- expect
- git
- lvm2
- xfsprogs
- btrfs-progs
- python-devel
- python-pip
- libselinux-python
- autofs
- parted
- mlocate
- ksh
- psmisc
- grubby
List of RPMs for RHEL8 or OL8
common_packages_el8:
- facter
- procps
- module-init-tools
- ethtool
- lsof
- bc
- binutils
- elfutils-libelf
- elfutils-libelf-devel
- fontconfig-devel
- glibc
- glibc-devel
- ksh
- libaio
- libaio-devel
- libXrender
- libX11
- libXau
- libXi
- libXtst
- libgcc
- libnsl
- librdmacm
- libstdc++
- libstdc++-devel
- libxcb
- libibverbs
- make
- smartmontools
- sysstat
- nc
- bind-utils
- nfs-utils
- unzip
- openssh-clients
- rlwrap
- tigervnc-server
- expect
- git
- lvm2
- xfsprogs
- autofs
- parted
- mlocate
- psmisc
- python3
- python3-pip
- grubby
List of RPMs for RHEL9 or OL9
common_packages_el9:
- autofs
- bind-utils
- binutils
- ethtool
- expect
- facter
- fontconfig
- git
- glibc
- glibc-devel
- grubby
- initscripts
- ksh
- libaio
- libaio-devel
- libgcc
- libnsl
- libstdc++
- libstdc++-devel
- lsof
- lvm2
- make
- mlocate
- module-init-tools
- nc
- net-tools
- nfs-utils
- openssh-clients
- pam
- parted
- policycoreutils
- policycoreutils-python-utils
- procps
- psmisc
- python3
- python3-pip
- python3-packaging
- rlwrap
- smartmontools
- sysstat
- tar
- unzip
- util-linux-ng
- xfsprogs
- xorg-x11-utils
- xorg-x11-xauth
List of RPMs for SuSE Linux Enterprise Server
common_packages_sles:
- screen
- procps
- module-init-tools
- ethtool
- bc
- bind-utils
- make
- sysstat
- unzip
- chrony
- expect
- lvm2
- autofs
configure_epel_repo: true
Configure Message of the day
configure_motd: true
Configure ntpd or chrony on target system.
The chrony or ntp is automatically chosen by ntp_type.
configure_ntp: true
configure_public_yum_repo: true
URL for epel-release-latest-10.noarch.rpm
epel10_rpm: oracle-epel-release-el10
Url for epel-release-latest-6.noarch.rpm
epel6_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Url for epel-release-latest-7.noarch.rpm
epel7_rpm: https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
Url for epel-release-latest-8.noarch.rpm
epel8_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Url for epel-release-latest-9.noarch.rpm
epel9_rpm: oracle-epel-release-el9
Define the http proxy for downloads
http_proxy: ''
Define the https proxy for downloads
https_proxy: ''
install_os_packages: true
Used templatename for Message of the day
motd_template: motd.j2
Define no_proxy list für downlads.
no_proxy: ''
This is an internal variable only. Do not define it!
ntp_type: _unset_
The variable is used to cleanup the yum repolist for old installations.
ol6_repo_file: public-yum-ol6.repo
The variable is used to cleanup the yum repolist for old installations.
ol7_repo_file: public-yum-ol7.repo
This is an internal variable for downloading patches. Usually no need to change it.
proxy_env:
http_proxy: '{{ http_proxy }}'
https_proxy: '{{ https_proxy }}'
no_proxy: '{{ no_proxy }}'
Enable Proxy for Download
use_proxy: false
common_assert
commonpackages
epelrepo
motd
olrepo
license (MIT)
[Mikael Sandström]
Install python-oracledb with pip.
python-oracledb is the successor of cx_Oracle and is used by the modules of ansible-oracle.
The role replaces the removed role cxoracle.
This role has a dependency to orasw_meta.
2.16.0Define optional arguments for extra_args during pip installation.
The variable is used by pyoracledb_use_proxy and pyoracledb_http_proxy and
supports client certificates known from orasw_meta.
Set it for other pip options, e.g. --index-url=https://pypi.example.com/simple for an internal mirror.
pyoracledb_extra_args: ''
Define the http_proxy for the pip installation.
Needed when pyoracledb_use_proxy: true.
pyoracledb_http_proxy: proxy.example:3128
Install python-oracledb?
pyoracledb_install: true
Define umask for pip installation of python-oracledb
Use a http_proxy for the pip installation
pyoracledb_use_proxy: false
Version of python-oracledb for Python versions without an own variable pyoracledb_version_py<major><minor>.
The version is updated by renovate.
The version is selected with the Python version of the target host (ansible_python_interpreter).
pyoracledb_version: 26.1.0
Version of python-oracledb for Python 3.6 (Oracle Linux / RHEL 8, SLES 15). Last release for Python 3.6, not updated by renovate.
pyoracledb_version_py36: 1.4.2
Version of python-oracledb for Python 3.7. Last release for Python 3.7, not updated by renovate.
pyoracledb_version_py37: 2.3.0
Version of python-oracledb for Python 3.8. Last release for Python 3.8, not updated by renovate.
pyoracledb_version_py38: 3.0.0
Version of python-oracledb for Python 3.9 (Oracle Linux / RHEL 9). Last release for Python 3.9, not updated by renovate.
pyoracledb_version_py39: 4.0.2
Directory with wheel files of python-oracledb for an installation without the Python package index.
pip selects the wheel file matching the Python version of the target host
(pip install --no-index --find-links <pyoracledb_wheel_dir> oracledb==<version>),
so one directory can contain the wheel files for all Python versions (e.g. cp36 and cp39).
<oracle_stage>/pyoracledb on the target host
when is_sw_source_local: true and oracle_sw_copy: true.
With oracle_sw_copy: false the directory must exist on the target host (e.g. NFS).http://, https://) of a page with links to the wheel files, used directly by pipThe role ensures pip >= 19.3 (needed for manylinux2014 wheels, the system pip of OL8 is 9.0.3).
Add a pip wheel to the directory for target hosts with an older pip, e.g. pip-21.3.1-py3-none-any.whl for Python 3.6.
Download the wheel files on a host with access to the package index, e.g.:
pip download --no-deps --only-binary=:all: --python-version 3.9 --platform manylinux2014_x86_64 -d <dir> oracledb==4.0.2
pyoracledb_wheel_dir: /sw/python-oracledb
pyoracledb
license (MIT)
[Thorsten Bruhns]
Role to configure the hostsystem for ansible-oracle
2.16.0Install oracleasm-support from RPM-Repo on OracleLinux.
Value depends on OS-Release from RHEL/OL.
Uses variables asmlib_rpm_el6, asmlib_rpm_el7 or asmlib_rpm_el8
asmlib_rpm: Value from `asmlib_rpm_el6`, `asmlib_rpm_el7` or `asmlib_rpm_el8`
Name / Url for rpm oracleasm-support for RHEL6/OL6.
asmlib_rpm_el6: http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm
Name / Url for rpm oracleasm-support for RHEL7/OL7.
asmlib_rpm_el7: http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el7.x86_64.rpm
Name / Url for rpm oracleasm-support for RHEL8/OL8.
asmlib_rpm_el8: https://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.17-1.el8.x86_64.rpm
Name / Url for rpm oracleasm-support for SLES.
asmlib_rpm_sles: http://oss.oracle.com/projects/oracleasm-support/dist/files/RPMS/sles12/amd64/2.1.8/oracleasm-support-2.1.8-1.SLE12.x86_64.rpm
Install oracleasmlib-support from RPM-Repo on OracleLinux. Value depends on OS-Release from RHEL/OL.
important
Do NOT set this variable.
Set the used variables asmlibsupport_rpm_el6, asmlibsupport_rpm_el7 or asmlibsupport_rpm_el8.
asmlibsupport_rpm: Value from `asmlibsupport_rpm_el6`, `asmlibsupport_rpm_el7` or `asmlibsupport_rpm_el8`
asmlibsupport_rpm_el6: http://oss.oracle.com/projects/oracleasm-support/dist/files/RPMS/rhel6/amd64/2.1.8/oracleasm-support-2.1.8-1.el6.x86_64.rpm
asmlibsupport_rpm_el7: https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasm-support-2.1.11-2.el7.x86_64.rpm
asmlibsupport_rpm_el8: https://yum.oracle.com/repo/OracleLinux/OL8/latest/x86_64/getPackage/oracleasm-support-2.1.11-2.el8.x86_64.rpm
Add {{ ansible_hostname }} {{ ansible_fqdn }} to /etc/hosts`?
configure_etc_hosts: false
Configure Hugepages?
configure_hugepages: true
Defines if percent_hugepages or size_in_gb_hugepages is used to define the Hugepages. Allowed values: percentage or memory.
configure_hugepages_by: memory
configure_hugepages_by: memory
configure_hugepages_by: percentage
Should the Interconnect network be configured by Ansible
configure_interconnect: false
Configure /etc/security.d/limits.d/99-oracle-limits.conf?
configure_limits: true
Configure /etc/pam.d/limits?
configure_limits_pam: true
Add oracle to sudoers for root.
configure_oracle_sudo: false
Should passwordless ssh be configured between clusternodes. Only applicable to RAC-installs
configure_ssh: false
Should the Linux firewall be disabled? Only applicable to RHEL/OL at the moment.
disable_firewall: false
Disable numa support during boot.
disable_numa_boot: true
disable_selinux: true
List of additional entries, optionally along with aliases, to be put into /etc/hosts. E.g. on non-DNS environments or if we don’t rely on DNS
etc_hosts_entries: []
etc_hosts_entries:
- fqdn: clusternode1.example.com
ip: 192.168.1.1
- fqdn: clusternode2.example.com
ip: 192.168.1.2
aliases:
- myalias.example.com
would create following entries in /etc/hosts:
192.168.1.1 clusternode1 clusternode1.example.com
192.168.1.2 clusternode2 clusternode2.example.com myalias.example.com
Set IP to 2nd Interface on virtualbox and 1st for all otehr installations
etc_hosts_ip: "{% if 'virtualbox' in ansible_virtualization_type %}{{ ansible_all_ipv4_addresses[1] }}{% else %}{{ ansible_default_ipv4.address }}{% endif %}"
According to MOS KB151310’s hugepages_settings.sh we’ve to add 1 page per shm segment.
Empirically, instances allocate 4 segments each on Linux.
This overhead is considered when computing nr_hugepages_memory
Type: integer
extra_hugepages_per_instance: 4
List of disabled yum repos during installation for RHEL/OL.
extrarepos_disabled: '[]'
extrarepos_enabled: "{%- if ansible_distribution == 'OracleLinux' -%}ol{{ ansible_distribution_major_version }}_addons{%- else -%}{%- endif %}"
Should the Listener ports be opened on the Linux firewall? Only applicable to RHEL/OL at the moment.
firewall_open_listener_ports: true
Used firewall service in OS. Value depends on used Distribution and version.
firewall_service: firewalld or iptables
grid OS-User
grid_users:
- username: grid
uid: 54320
primgroup: '{{ oracle_group }}'
othergroups: '{{ asmadmin_group }},{{ asmdba_group }},{{ asmoper_group }},{{ dba_group }}'
Define physical Disk, Volume Group, logical Volume, Filesystem and swap Devices. See example configuration
host_fs_layout: '[]'
host_fs_layout:
- vgname: vgora
state: present
filesystem:
- { mntp: /u01, lvname: lvorabase, lvsize: 25G, fstype: xfs }
- { mntp: /u02, lvname: lvoradata, lvsize: 25G, fstype: xfs, fsopts: "-m reflink=1 -m crc=1" }
disk:
- { device: /dev/sdb, pvname: /dev/sdb1 }
Install addional RPMs for Oracle?
install_os_packages: true
keyfile: /tmp/known_hosts
Cap HugePages to 70% of physical memory to prevent overcomitting. Only valid when configure_hugepages_by: memory
max_size_in_gb_hugepages: '{{ ansible_memtotal_mb / 1024 * 0.7 }}'
This is an internal variable only. Do not define it!
nr_hugepages: _unset_
This is an internal variable only. Do not define it!
nr_hugepages_memory: _unset_
This is an internal variable only. Do not define it!
nr_hugepages_percent: _unset_
old_ssh_config: true
List of RPMs installed during ASM preparation for RHEL/OL.
There should be no reason to change this variable.
oracle_asm_packages:
- '{{ asmlib_rpm }}'
- '{{ asmlibsupport_rpm }}'
- kmod-oracleasm
List of RPMs installed during ASM preparation for SLES.
There should be no reason to change this variable.
oracle_asm_packages_sles:
- oracleasm-kmp-default
- oracleasm-kmp-xen
- '{{ asmlib_rpm_sles }}'
Define additional ports to open on the OS firewall.
oracle_extra_firewall_ports: '[]'
oracle_extra_firewall_ports:
- 5500 # EM Express
List of OS-groups for Oracle Dependent variables are defined in orahost_meta/defaults/main.yml
oracle_groups:
- {group: '{{ asmdba_group }}', gid: 54318}
- {group: '{{ asmoper_group }}', gid: 54319}
- {group: '{{ asmadmin_group }}', gid: 54320}
- {group: '{{ oracle_group }}', gid: 54321}
- {group: '{{ dba_group }}', gid: 54322}
- {group: '{{ oper_group }}', gid: 54324}
- {group: backupdba, gid: 54323}
- {group: dgdba, gid: 54325}
- {group: kmdba, gid: 54326}
This is an internal variable. Do not change it!
oracle_hugepages:
- {name: vm.nr_hugepages, value: '{{ nr_hugepages }}'}
- {name: vm.hugetlb_shm_group, value: "{{ oracle_user_getent['ansible_facts']['getent_passwd'][oracle_user][2] }}"}
Allows to specify the file in which sysctl settings for huge pages will be stored.
When unspecified it will first fallback to be oracle_sysctl_file
and then to module defaults (/etc/sysctl.conf) should that one also be not defined.
oracle_hugepages_sysctl_file: _unset_
oracle_hugepages_sysctl_file: '/etc/sysctl.d/oracle-hugepages.conf'
Picks the last octet from the public ip to use for cluster-interconnect ip (e.g 3.3.3.51)
oracle_ic_net: 3.3.3.{{ ansible_all_ipv4_addresses[0].split(".")[-1] }}
List of additinal RPMs for RHEL/OL.
install_os_packages: true is needed to install the RPMs.
oracle_packages:
- bind-utils
- nfs-utils
- util-linux-ng
- xorg-x11-utils
- xorg-x11-xauth
- binutils
- compat-libstdc++-33
- compat-libstdc++-33.i686
- unixODBC-devel
- unixODBC-devel.i686
- gcc
- gcc-c++
- glibc
- glibc.i686
- glibc-devel
- glibc-devel.i686
- libaio
- libaio-devel
- libaio.i686
- libaio-devel.i686
- libgcc
- libgcc.i686
- libstdc++
- libstdc++-devel
- libstdc++.i686
- libstdc++-devel.i686
- libXext
- libXext.i686
- zlib-devel
- zlib-devel.i686
- make
- sysstat
- openssh-clients
- compat-libcap1
- xorg-x11-xauth
- xorg-x11-xinit
- libXtst
- xdpyinfo
- xterm
- xsetroot
- libXp
- libXt
- libXau
- libXau.i686
- libXi
- libXi.i686
- libX11
- libX11.i686
- smartmontools
- elfutils-libelf-devel.i686
- elfutils-libelf-devel
- cpp
- lsof
- compat-openssl11
- fontconfig
- glibc-langpack-en
List of additinal RPMs for different SLES version.
List is based on: https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/database-installation-guide-linux.pdf
install_os_packages: true is needed to install the RPMs.
oracle_packages_sles_multi:
- name: SLES common packages
condition: true
packages:
- bc
- binutils
- glibc
- glibc-devel
- libaio-devel
- libaio1
- libcap-ng-utils
- libcap-ng0
- libcap-progs
- libcap2
- libgcc_s1
- libpcap1
- libpcre1
- libpcre16-0
- libpng16-16
- libstdc++6
- libtiff5
- libXau6
- libXrender1
- libXtst6
- make
- mksh
- pixz
- rdma-core
- rdma-core-devel
- smartmontools
- sysstat
- xorg-x11-libs
- xz
- name: SLES 12 packages
condition: "{{ ansible_distribution_major_version == '12' }}"
packages:
- libcap1
- libelf-devel
- libjpeg-turbo
- libjpeg62
- libjpeg62-turbo
- libX11
- name: SLES 15 packages
condition: "{{ ansible_distribution_major_version == '15' }}"
packages:
- insserv-compat
- libelf1
- libgfortran4
- libjpeg8
- libX11-6
- libXext-devel
- libXext6
- libXi-devel
- libXi6
- libXrender-devel
- name: SLES 15 SP3+ extra packages
condition: "{{ ansible_distribution_version is version('15.3', 'ge') }}"
packages:
- compat-libpthread-nonshared
Configure parameter in sysctl.
Important
Do not add configurations for Hugepages here!
oracle_sysctl:
- {name: kernel.shmall, value: 4294967296}
- {name: kernel.shmmax, value: 68719476736}
- {name: kernel.shmmni, value: 4096}
- {name: kernel.sem, value: 250 32000 100 128}
- {name: fs.file-max, value: 6815744}
- {name: fs.aio-max-nr, value: 3145728}
- {name: net.ipv4.ip_local_port_range, value: 9000 65500}
- {name: net.core.rmem_default, value: 262144}
- {name: net.core.rmem_max, value: 4194304}
- {name: net.core.wmem_default, value: 262144}
- {name: net.core.wmem_max, value: 1048576}
- {name: kernel.panic_on_oops, value: 1}
- {name: vm.min_free_kbytes, value: 524288}
Allows to specify the file in which sysctl settings will be stored. When unspecified it will
be put to /etc/sysctl.conf by the module defaults (omit)
oracle_sysctl_file: _unset_
oracle_sysctl_file: '/etc/sysctl.d/oracle.conf'
oracle OS-User
oracle_users:
- username: oracle
uid: 54321
primgroup: '{{ oracle_group }}'
othergroups: '{{ dba_group }},{{ asmadmin_group }},{{ asmdba_group }},{{ asmoper_group }},backupdba,dgdba,kmdba,{{ oper_group }}'
Support is limited to RHE/OL and SuSE
os_family_supported: "{% if ansible_os_family == 'Suse' %}Suse{% else %}RedHat{% endif %}"
Minimum supported versions for SLES is 12.1 and RHEL/OL >= 6.4
os_min_supported_version: "{% if ansible_os_family == 'Suse' %}12.1{% else %}6.4{% endif %}"
Define percentage from RAM for Hugepages. Only valud when configure_hugepages_by: percentage
percent_hugepages: 50
Size in GB for Hugepages. Only valud when configure_hugepages_by: memory
size_in_gb_hugepages: 1
ssh_keys:
- /tmp/id_rsa
- /tmp/id_rsa.pub
- /tmp/authorized_keys
Used ansible template for sudoers configuration.
sudoers_template: sudoers.j2
Disable Transparent Hugepages during boot.
Important
It is strongly recommended to disable Transparent Hugepages. Do not change this variable.
transparent_hugepage_disable:
- {disable: echo never >, path: /sys/kernel/mm/transparent_hugepage/enabled, rclocal: /etc/rc.d/rc.local}
- {disable: echo never >, path: /sys/kernel/mm/transparent_hugepage/defrag, rclocal: /etc/rc.d/rc.local}
Alternatively to dynamically disabling transparent hugepages using rc.local, disable transparent hugepages using kernel command line.
Note: Setting transparent_hugepage_disable_by_grub true obsoletes transparent_hugepage_disable
transparent_hugepage_disable_by_grub: false
always
asmlibconfig
etchosts
eth1
group
hostfs
hugepages
iptables,firewalld
molecule-idempotence-notest
nozeroconf
orahost_assert
os_packages, oscheck
os_packages, oscheck, asm1
oscheck
pamconfig
seclimit
selinux
sshkeys
stagedir
sudoadd
sysctl
tphnuma
tphnuma,molecule-idempotence-notest
user
license (MIT)
[Mikael Sandström]
Manage Oracle AutoUpgrade.
The role has no tasks/main.yml.
Each area of AutoUpgrade has its own task file, which must be called with tasks_from:
| Task file | Description |
|---|---|
assert.yml |
Check variables and Java |
install.yml |
Install autoupgrade.jar into autoupgrade_home |
download_patches.yml |
Download patches from My Oracle Support with AutoUpgrade |
upgrade_analyze.yml |
Analyze phase for the Unplug/Plug upgrade of PDBs (oracle_pdbs): AutoUpgrade analyze |
upgrade_fixups.yml |
Fixups phase: AutoUpgrade fixups in the source CDB/PDBs |
upgrade_deploy.yml |
Unplug/Plug upgrade of PDBs: analyze phase + AutoUpgrade deploy |
See doc/guides/autoupgrade_upgrade.adoc for the upgrade of PDBs.
2.16.0Value for global.download_folder. Downloaded patches are placed here.
autoupgrade_download_dir: '{{ oracle_sw_source_local }}'
Regex for filename in oracle_sw_patches.
Only matching entries are downloaded by AutoUpgrade (database patches for autoupgrade_download_platform).
autoupgrade_download_filename_regex: ^p[0-9]+_[0-9A-Za-z]+_Linux-x86-64\.zip$
Value for patch<n>.gold_image in the AutoUpgrade config file for all patch sections.
Can be overwritten with attribute gold_image in autoupgrade_download_patches.
NO: no gold image is downloaded.
AUTO, YES, ALL: see Oracle documentation for AutoUpgrade.
Empty: parameter is not written and the default from AutoUpgrade (AUTO) is used.
autoupgrade_download_gold_image: ''
autoupgrade_download_gold_image: "NO"
Create a symlink to the latest Gold Image of each release (autoupgrade_download_gold_image_rename: true).
The symlink is named autoupgrade_download_gold_image_prefix + major release + _latest.zip
and points to the renamed Gold Image with the highest release update in autoupgrade_download_dir:
| Renamed Gold Images | Symlink |
|---|---|
db_home_19.31.zip, db_home_19.32.zip |
db_home_19_latest.zip -> db_home_19.32.zip |
db_home_26.03.zip, db_home_26.04.zip |
db_home_26_latest.zip -> db_home_26.04.zip |
The symlink is changed only, when a newer Gold Image exists. The download of an older release update does not change the symlink.
Use the symlink as imagename in db_homes_config for an inventory independent of the release update.
autoupgrade_download_gold_image_latest: false
Prefix for the new filename of a Gold Image (autoupgrade_download_gold_image_rename: true).
autoupgrade_download_gold_image_prefix: db_home_
Rename downloaded Gold Images after the download.
AutoUpgrade creates unique filenames with a timestamp, e.g. db_goldimage_19_32_20261021112350.zip.
The file is renamed to autoupgrade_download_gold_image_prefix + release + .zip:
| Gold Image (AutoUpgrade) | Renamed file |
|---|---|
db_goldimage_19_32_<timestamp>.zip (19.32) |
db_home_19.32.zip |
db_goldimage_23_26_3_<timestamp>.zip (23.26.3) |
db_home_26.03.zip |
A symlink with the original filename is created for the renamed file. AutoUpgrade finds the file under the original name and skips a new download. The symlinks can be removed for cleanup. They are not created again.
Release and filename are taken from patches_info.json in autoupgrade_download_dir.
An existing file with the new name is never replaced.
autoupgrade_download_gold_image_rename: false
Download the latest autoupgrade.jar from autoupgrade_jar_url into the software
repository before the installation.
The target depends on the location of the installation media:
| Installation media | Download to |
|---|---|
oracle_sw_copy: true or autoupgrade_run_local: true |
Ansible controller (run_once, no become): autoupgrade_jar_filesource or oracle_sw_source_local/autoupgrade_jar. Requires is_sw_source_local: true. |
oracle_sw_copy: false |
target host as oracle_user: autoupgrade_jar_filesource or oracle_stage_remote/autoupgrade_jar. The directory must exist and be writable for oracle_user. |
Existing installations are only replaced with autoupgrade_force_update: true.
autoupgrade_download_latest: false
List of patches to download with download_patches.yml.
Each element creates a patch<n> section in the AutoUpgrade config file.
| Attribute | Description |
|---|---|
| target_version | mandatory: release, e.g. 19, 23 |
| patch | mandatory: e.g. RECOMMENDED or RU,OPATCH,OJVM,DPBP or RU:19.28,OPATCH |
| platform | optional: default autoupgrade_download_platform |
| gold_image | optional: NO, AUTO, YES, ALL - default autoupgrade_download_gold_image |
autoupgrade_download_patches: []
autoupgrade_download_patches:
- target_version: 19
patch: RU,OPATCH,OJVM,DPBP
- target_version: 23
patch: RECOMMENDED
platform: LINUX.X64
- target_version: 19
patch: RU,OPATCH,OJVM,DPBP
gold_image: "NO"
Default platform for the download, when platform is not set in autoupgrade_download_patches.
autoupgrade_download_platform: LINUX.X64
Releases supported by AutoUpgrade for downloading patches.
autoupgrade_download_supported_releases: [19, 21, 23, 26]
Use the same variables as role orasw_download_patches for the download:
oracle_sw_patches: each entry is added to the AutoUpgrade patch list
of the release from version (e.g. 19.3.0.0 -> target_version=19).
AutoUpgrade does not accept Release Updates by patch number. The keyword is derived:Entry in oracle_sw_patches |
AutoUpgrade |
|---|---|
attribute autoupgrade_patch |
value, e.g. RU:19.24, OJVM, DPBP |
attribute ru_version (Release Update), e.g. 19.24.0.0.240716 |
RU:19.24 |
description contains OJVM |
OJVM |
| others | patchid (one-off) |
db_homes_installed / db_homes_config and oracle_install_version_gi
(oracle_install_option_gi: CRS_CONFIG or HA_CONFIG):
OPATCH is downloaded for each releaseThe result is added to autoupgrade_download_patches.
See autoupgrade_run_local for multiple hosts in the play.
Only entries from oracle_sw_patches are used, where filename matches
autoupgrade_download_filename_regex and the release from version is in
autoupgrade_download_supported_releases. Others (e.g. APEX, cvupack) are ignored with a warning.
The My Oracle Support credentials (mos_username / mos_password) are read
by AutoUpgrade from the keystore autoupgrade_keystore.
autoupgrade_download_use_oracle_sw_patches: true
Update an existing autoupgrade.jar in the AutoUpgrade home.
false: An existing file is never replaced.
true: The file is replaced, when it differs from the file in the software repository.
autoupgrade_force_update: false
Directory for autoupgrade.jar and the generated AutoUpgrade config files
on the target host.
autoupgrade_home: '{{ oracle_base }}/product/autoupgrade'
Filename of AutoUpgrade.
The file is expected under oracle_sw_source_local / oracle_sw_source_www.
On the Ansible controller the file is always taken from oracle_sw_source_local
(is_sw_source_local: true) or oracle_sw_source_www - oracle_sw_copy is ignored.
autoupgrade_jar: autoupgrade.jar
If autoupgrade_jar is not placed under oracle_sw_source_local / oracle_sw_source_www,
path can be forced using autoupgrade_jar_filesource instead.
autoupgrade_jar_filesource must be the full path/URL, including the filename.
autoupgrade_jar_filesource: /orasw/autoupgrade/autoupgrade.jar
URL for the latest version of AutoUpgrade (used by autoupgrade_download_latest).
autoupgrade_jar_url: https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar
JAVA_HOME used for AutoUpgrade on the target host.
java from PATH is used, when autoupgrade_java_home is empty.
autoupgrade_java_home: ''
autoupgrade_java_home: /u01/app/oracle/product/19/db1/jdk
Additional Java options for each call of autoupgrade.jar, e.g. a truststore
for a proxy with TLS inspection.
With proxy credentials (autoupgrade_proxy_username or credentials in https_proxy)
-Djdk.http.auth.tunneling.disabledSchemes= is added automatically,
because Java disables Basic authentication for HTTPS tunneling by default.
autoupgrade_java_options: []
autoupgrade_java_options:
- -Djavax.net.ssl.trustStore=/etc/pki/java/cacerts
- -Djavax.net.ssl.trustStorePassword=changeit
Value for global.keystore in the AutoUpgrade config files.
The keystore holds the My Oracle Support credentials (mos_username, mos_password)
and is managed by keystore.yml (included by download_patches.yml).
autoupgrade_keystore: '{{ _autoupgrade_home }}/keystore'
Fail, when the credentials in the keystore cannot login into My Oracle Support.
autoupgrade_keystore_fail_on_invalid_credentials: true
Create/update the keystore with mos_username / mos_password in download_patches.yml.
false: The keystore must exist. It is not changed by the role.
Requires the Python module pexpect on the host executing AutoUpgrade.
autoupgrade_keystore_manage: true
Hide the output of tasks with passwords for the keystore console.
Set to false for debugging only!
autoupgrade_keystore_no_log: true
Password for the AutoUpgrade keystore. At least 16 characters are required.
When autoupgrade_keystore_password is empty, the SHA256 hash of mos_password is used.
When mos_password is changed, the keystore cannot be opened for changes anymore.
The keystore is then removed and created again with the new credentials.
The same happens, when autoupgrade_keystore_password is changed.
autoupgrade_keystore_password: ''
Remove and create the keystore in each execution.
autoupgrade_keystore_recreate: false
Timeout in seconds for each prompt of the keystore console. The console connects to My Oracle Support for checking the credentials.
autoupgrade_keystore_timeout: 300
Directory for autoupgrade.jar and the generated AutoUpgrade config files
on the Ansible controller (autoupgrade_run_local: true).
autoupgrade_local_home: "{{ lookup('ansible.builtin.env', 'HOME') }}/autoupgrade"
JAVA_HOME used for AutoUpgrade on the Ansible controller (autoupgrade_run_local: true).
java from PATH is used, when autoupgrade_local_java_home is empty.
autoupgrade_local_java_home: ''
Value for global.global_log_dir in the AutoUpgrade config files.
autoupgrade_log_dir: >-
{{ _autoupgrade_run_local | bool
| ternary(_autoupgrade_home + '/log', oracle_base + '/cfgtoollogs/autoupgrade') }}
Check the connection to Oracle before AutoUpgrade (download_patches.yml) or get_url
(autoupgrade_download_latest) is executed.
The check uses the same host, user and proxy settings (http_proxy, https_proxy, no_proxy,
autoupgrade_proxy_username, autoupgrade_proxy_password) as the later download.
Any HTTP response of the target counts as success.
Errors are explained (e.g. proxy authentication failed, proxy not reachable, no route to the internet),
before they lead to misleading errors of AutoUpgrade or of the keystore.
The upgrade of PDBs does not need a connection to the internet and does not execute the check.
autoupgrade_proxy_check: true
Timeout in seconds for each URL of the check of the connection.
autoupgrade_proxy_check_timeout: 30
URLs for the check of the connection in download_patches.yml.
These are the hosts used by AutoUpgrade 26 for the login into My Oracle Support and the download of patches.
For autoupgrade_download_latest the host of autoupgrade_jar_url is checked.
autoupgrade_proxy_check_urls:
- https://login-ext.identity.oraclecloud.com
- https://transport.oracle.com
- https://updates.oracle.com
- https://aru-akam.oracle.com
Password for an HTTP proxy with authentication. See autoupgrade_proxy_username.
autoupgrade_proxy_password: ''
Username for an HTTP proxy with authentication.
The proxy itself is defined with http_proxy, https_proxy and no_proxy
(same variables as for other downloads in ansible-oracle).
Username and password are added URL encoded to http_proxy and https_proxy:
http://<user>:<password>@proxy:3128.
Credentials in http_proxy / https_proxy are not changed.
The proxy is used by get_url (download of autoupgrade.jar) and by AutoUpgrade
(keystore, download of patches). AutoUpgrade reads https_proxy.
AutoUpgrade needs access to updates.oracle.com, login-ext.identity.oraclecloud.com
and aru-akam.oracle.com.
autoupgrade_proxy_username: ''
https_proxy: http://proxy.example.com:3128
no_proxy: localhost,.example.com
autoupgrade_proxy_username: proxyuser
autoupgrade_proxy_password: "{{ vault_proxy_password }}"
Execute AutoUpgrade on the Ansible controller instead of the target host.
The switch is valid for all task files (install.yml, keystore.yml, download_patches.yml).
true (default): Tasks are delegated to localhost with run_once and without become.
autoupgrade_local_home and autoupgrade_local_java_home are used.
This is useful for downloading patches into the software repository on the Ansible controller.
false: Tasks are executed on the target host as oracle_user,
e.g. for the installation of AutoUpgrade on database servers.
Important
With true the tasks are executed only once (run_once) with the variables
of the first host in the play (oracle_sw_patches, db_homes_installed, db_homes_config,
oracle_install_version_gi, autoupgrade_download_patches).
These variables must be the same for all hosts in the play - e.g. defined in group_vars/all
for the whole environment.
When they are defined per host, limit the playbook to one host (--limit <host>)
or execute it for each host.
autoupgrade_run_local: true
Discard the recovery data of AutoUpgrade (-clear_recovery_data) before the analyze phase.
AutoUpgrade keeps recovery data after each deploy - finished or not. The role handles it automatically:
| Recovery data | Behaviour |
|---|---|
| finished deploy, PDBs pending | cleared automatically before analyze/fixups |
| finished deploy, all PDBs upgraded | kept (needed for -restore) |
| unfinished deploy | deploy phase: resumed. analyze/fixups phase: fail |
true: the recovery data is discarded in any case, e.g. after a manual restore of the PDBs.
An unfinished deploy cannot be resumed anymore!
autoupgrade_upgrade_clear_recovery_data: false
Fail the analyze phase and the fixups phase, when AutoUpgrade reports checks with severity ERROR,
which cannot be fixed automatically by AutoUpgrade (no fixup available or runfix is NO).
The deploy phase is never started, when these checks fail.
autoupgrade_upgrade_fail_on_precheck_errors: true
Additional global parameters for the upgrade config files (global.<key>=<value>).
global_log_dir is set by the role.
autoupgrade_upgrade_global_parameters: {}
autoupgrade_upgrade_global_parameters:
keystore: /u01/app/oracle/admin/autoupgrade/keystore
Default AutoUpgrade parameters for all AutoUpgrade jobs (upg1.<key>=<value>).
Can be overwritten with autoupgrade.parameters in oracle_pdbs.
Values are written unchanged. Booleans are converted into yes/no.
autoupgrade_upgrade_parameters: {}
autoupgrade_upgrade_parameters:
timezone_upg: "yes"
drop_grp_after_upgrade: "yes"
Limit upgrade_analyze.yml / upgrade_fixups.yml / upgrade_deploy.yml to these PDBs (pdb_name in oracle_pdbs).
Empty (default): all PDBs in oracle_pdbs with attribute autoupgrade
and state: present are processed.
The upgrade is an Unplug/Plug upgrade of PDBs into a CDB of the new release.
oracle_pdbs defines the end state: cdb and home are the target CDB and target ORACLE_HOME.
The source is defined with the attribute autoupgrade of the PDB:
| Attribute | Description |
|---|---|
| source_cdb | mandatory: oracle_db_name of the source CDB |
| source_home | optional: key in db_homes_config of the source ORACLE_HOME. Default: home of source_cdb in oracle_databases |
| source_sid | optional: SID of the source CDB. Default: from source_cdb in oracle_databases, otherwise source_cdb |
| source_pdb_name | optional: name of the PDB in the source CDB. Default: pdb_name |
| copy_option | optional: upg1.target_pdb_copy_option.<pdb>, e.g. file_name_convert=NONE. Default: datafiles are reused (no copy) |
| restoration | optional: true/false - default autoupgrade_upgrade_restoration |
| parameters | optional: dict with additional AutoUpgrade parameters (upg1.<key>=<value>). Overrides autoupgrade_upgrade_parameters. |
All PDBs with the same source_cdb and cdb are upgraded in one AutoUpgrade job.
restoration and parameters must be identical for these PDBs.
sid, source_home, target_home, target_cdb, pdbs, log_dir and restoration
are set by the role and must not be used in parameters.
Important: Do not execute playbook manage_db between the change of oracle_pdbs
and the upgrade. oradb_manage_pdb would create a new, empty PDB in the target CDB.
autoupgrade_upgrade_pdbs: []
autoupgrade_upgrade_pdbs:
- ORCLPDB1
oracle_pdbs:
- cdb: DB26 # target CDB (end state)
home: db26-si-ee # target ORACLE_HOME (end state)
pdb_name: ORCLPDB1
state: present
autoupgrade:
source_cdb: DB2 # source CDB in 19c
source_home: db1932-si-ee
parameters:
timezone_upg: "yes"
Poll interval in seconds for AutoUpgrade in deploy mode.
autoupgrade_upgrade_poll: 60
Value for upg1.restoration for all AutoUpgrade jobs.
Can be overwritten with autoupgrade.restoration in oracle_pdbs.
false (default): AutoUpgrade creates no Guaranteed Restore Point before the upgrade
(upg1.restoration=no). There is no automatic fallback - take a backup before the upgrade!
true: AutoUpgrade creates a Guaranteed Restore Point before the upgrade (upg1.restoration=yes).
Requires a Fast Recovery Area and Enterprise Edition.
autoupgrade_upgrade_restoration: false
Maximum runtime in seconds for AutoUpgrade in deploy mode per AutoUpgrade job (async).
autoupgrade_upgrade_timeout: 21600
always
assert
license (MIT)
[Thorsten Bruhns]
Collection of handlers includeable by other roles.
Make them available to your role by including it into the dependency list in meta/main.yml of your role, for instance.
2.16.0Controls if reboot handler actually reboots the host (true) or just displays a reboot advice (false)
Type: bool
restart_on_requirement: false
None.
license (MIT)
[Thilo Solbrig]
The role is in pre ALPHA state.
A lot of changes are planned during development at the moment.
Limitations:
Documentation: https://github.com/oravirt/ansible-oracle/blob/master/doc/guides/apex_ords.adoc
2.16.0oraapex_base is used as a prefix directory for unzip for apex.zip.
oraapex_base: >-
{{ oracle_base }}/product
Password for apex_admin_user from oracle_databases or oracle_pdbs.
oraapex_default_files_tablespace: SYSAUX
oraapex_default_tablespace: SYSAUX
oraapex_default_temp_tablespace: TEMP
oraapex_image_path: /i/
oraapex_rac_primary_node_only: true
unarchive apex.zip in RAC only on 1st node or on all nodes?
This is only true, when ORDS runs on RAC nodes as well, because we need the images for ORDS. This should not be done on production setups!
license (MIT)
Manages ASM diskgroups.
Important
All variables in this role are internal use only. Do not set them in inventory!
2.16.0diskgroup
license (MIT)
[Mikael Sandström]
Manage Cluster Verification Utility from Oracle
2.16.0ZIP Archive used by the role.
oracluvfy_archive: cvupack_linux_ol7_x86_64.zip
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.
oracluvfy_archive_filesource: /full/path/to/cvupack_linux_ol7_x86_64.zip
Force unarchive of cluvfy in oracluvfy_home.
oracluvfy_force_update: false
oracluvfy_home: '{{ oracle_base }}/product/cluvfy'
always
assert
license (MIT)
[Thorsten Bruhns]
Manage datapatch for Oracle Database
2.16.0Should task for datapatch fail when database from oracle_databases is not existing?
Important!
Do not use fail_on_db_not_exist anymore.
The variable is deprecated and will be removed in a future release!
oradb_datapatch_fail_on_db_not_exist: '{{ fail_on_db_not_exist | default(false) }}'
datapatch
startdb
license (MIT)
[Mikael Sandström]
Gather Ansible Facts from database
2.16.0The dbuser for connection to database.
oradb_facts_db_user: sys
db_facts
license (MIT)
Thorsten Bruhns
Manage grants for users in Oracle Databases
2.16.0grants
grants2
grants4
users
license (MIT)
[Mikael Sandström]
Manage Oracle Database Parameters
2.16.0Bounce instane when parameter changes detected between SPFile and memory parameter.
IMPORTANT Note!
Some memory parameters are rounded internally by Oracle. Changing them in SPFile could lead to a bounce of the instance each time the role is executed. Change the paramter to the rounded value from Oracle to prevent this.
restart_spparameter_changed: false
initparams
Configure parameter for nonCDB, CDB and PDB
initparams_cdb
Configure parameter for nonCDB and CDB
initparams_pdb
Configure parameter for PDB
spfile_bounce
Bounce database when changed parameter need a restart.
license (MIT)
[Mikael Sandström]
Manage pluggable databases in Oracle
2.16.0Password for pdb_admin user.
pdbadmin_password: >-
{{ dbpasswords[odb.1.cdb][odb.1.pdb_name][pdbadmin_user] | default(default_dbpass) }}
Default pdb_admin user for newly created PDBs.
Could be set in oracle_pdbs to define different pdb_admin user for each PDB.
pdbadmin_user: >-
{{ odb[1].pdbadmin_user | default('PDBADMIN') }}
pdb
license (MIT)
[Mikael Sandström]
Manage database profiles in Oracle
2.16.0dbprofiles
license (MIT)
Manage roles in Oracle
2.16.0grants
users
license (MIT)
[Mikael Sandström]
Manage services in Oracle
2.16.0create_service
services
start_service
license (MIT)
[Mikael Sandström]
Manage Statspack in Oracle.
Not RAC aware at the moment.
2.16.0Global default variable for Statspack purgetime in days.
Could be defined for each database with oracle_databases.
An example is shown there.
purgedays: 35
Global default variable for Statspack purge interval in scheduler job.
Could be defined for each database with oracle_databases.
An example is shown there.
purgeinterval: FREQ=daily;byhour=3;byminute=15;bysecond=0
Global default variable for Statspack snap interval in scheduler job.
Could be defined for each database with oracle_databases.
An example is shown there.
snapinterval: FREQ=hourly;byminute=0;bysecond=0
Global default variable for Statspack snaplevel.
Could be defined for each database with oracle_databases.
An example is shown there.
snaplevel: 7
spcreate
Install Statspack in nonCDB, CDB or PDB
spdrop
Remove Statspack from nonCDB, CDB or PDB
spjob
Configure Statspack Scheduler Jobs
statspack
Do all Tasks for Statspack
license (MIT)
[Thorsten Bruhns]
Manage Tablespaces in Oracle
2.16.0tablespace
license (MIT)
Manage Users in Oracle
2.16.0users
license (MIT)
[Mikael Sandström]
Manage Wallets for Oracle with mkstore and orapki.
Multiple wallets with different locations are possible.
Define a password for the wallet in oracle_wallet_password.
2.16.0oracle_wallet_config: []
oracle_wallet_config:
- name: wallet1
home: 19300_base
path: /u01/app/oracle/wallet
state: present
dbcredentials:
- tns_name: db1
db_name: db1
db_user: user1
state: present
certificates:
- file: "/home/oracle/assets/certs/https/mysite.crt"
type: "cert"
extra_args: "-trusted_cert"
state: present
- file: "/home/oracle/assets/certs/oracle/test-server.pfx"
type: "pkcs12"
password: "secret123"
state: present
oracle_wallet_password: {}
oracle_wallet_password:
wallet1: <password>
wallet2: <password>
Show password during execution in loop label.
oracle_wallet_show_password: false
always
cert
license (MIT)
[Thorsten Bruhns]
Manage timezone upgrades for an Oracle Database
2.16.0license (MIT)
[Alexandru Tică]
Configure cronjobs for ansible-oracle
2.16.0Define custom cronjobs for ansible-oracle. No job is existing by default.
cron_config:
- { user: oracle, name: "clean-up job", job: "some fancy thing", hour: "1", cron_file: oracle-cleanup, state: present }
cron
None.
license (MIT)
[Mikael Sandström]
Configure logrotate for ansible-oracle
2.16.0Configuration of logrotate definitions.
logrotate_config:
- name: oracle_alert
file: '{{ oracle_base }}/diag/rdbms/*/*/trace/*alert*.log {{ oracle_base }}/diag/asm/*/*/trace/alert*+ASM*.log'
options:
- missingok
- notifempty
- weekly
- rotate 3
- dateext
- name: oracle_listener
file: '{{ oracle_base }}/diag/tnslsnr/*/*/trace/*listener*.log'
options:
- missingok
- notifempty
- weekly
- rotate 3
- dateext
- compress
- name: oracle_rman
file: "{{ rman_cron_logdir | default('/var/log/oracle/rman/log') }}/*.log {{ oracle_base }}/admin/*/rman/*.log {{ oracle_base }}/admin/*/rman/log/*.log"
options:
- missingok
- notifempty
- compress
- weekly
- rotate 24
- dateext
Define number of days for oracle_cleanup.sh logfiles and audit files.
oracle_cleanup_days: 14
oracle_home_gi: '{% if _oraswgi_meta_configure_cluster %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}'
oracle_home_gi_cl: /u01/app/{{ oracle_install_version_gi }}/grid
oracle_home_gi_so: '{{ oracle_base }}/{{ oracle_install_version_gi }}/grid'
Define number of days for ADR in Oracle.
oracle_trace_cleanup_days: 7
Setup of logrotate/cleanup is optional
orahost_logrotate_setup_logrotate: true
license (MIT)
[Thorsten Bruhns]
SSH Setup for Oracle Grid-Infrastructure installations.
2.16.0The name of used key during role execution.
Example for oracle:
/home/oracle/.ssh/{{ orahost_ssh_keyname }}
orahost_ssh_keyname: id_{{ orahost_ssh_key_type }}
license (MIT)
[Thorsten Bruhns]
Role to configure the storage for oracle.
2.16.0asmlib_binary: /usr/sbin/oracleasm
Configure multipath
multipath: none
multipath: dm-multipath
Defines the settings for dnfstab in Oracle.
oradnfs: _unset_
oradnfs:
- server: nfsserver
ips:
- local: dbserver
path: nfsserver
exports:
- export: /nfs/oradata
mount: /u02/oradata2
- export: /nfs/oradata2
mount: /u02/oradata
Create a partition on storage disk?
partition_devices: true
Value of partition_suffix depends on vairable multipath.
No need to set this variable.
partition_suffix: '1'
Deprecated variable. Use partition_devices as replacement.
use_partition_devices: true
asmlibconfig
asmstorage
kpartx
partition
udev
license (MIT)
[Mikael Sandström]
Install ORDS on Oracle Linux.
Defaults:
ORACLE_HOME: {{ oracle_base }}/product/ords
This role is limited to Oracle Linux, due to installation from yum Repository from Oracle.
2.16.0APEX context path for Images.
Directory for APEX Images on ORDS Host.
List of configured target in ORDS.
Attributes:
db_pool:
admin_user: <Admin user for ORDS installation. Defaults to oraords_default_admin_user>
service:
port: <Listener Port. Defaults to oraords_default_port>
host: <Hostname for target. Defaults to inventory_hostname>
feature_db_api: <true / false (default)>
feature_rest_enabled_sql: <true / false (default)>
feature_sdw: <true / false (default)>
oraords_db_pools:
- db_pool: default
admin_user: sys
service: orclpdb
port: 1521
oraords_default_admin_user: sys
oraords_default_port: 1521
oraords_java_rpm: java-21-openjdk
ORACLE_HOME for ORDS.
oraords_oracle_home: >-
{{ oracle_base }}/product/ords
PATH for ords binary
oraords_ords_bin: >-
/opt/oracle/ords/bin
ORDS configuration directory.
oraords_ords_config: >-
/etc/ords/config
ORDS logging directory.
oraords_ords_logs: >-
/etc/ords/logs
always
ords_config
license (MIT)
Thorsten Bruhns
Download all patches from Oracle
2.16.0Login name for My Oracle Support (required)
Password for My Oracle Support (required)
This is an internal variable for downloading patches. Usually no need to change it.
opatchinfo: []
Target directory for patch downloads
oracle_patch_download_dir: '{{ oracle_sw_source_local }}'
delegate_to host for downloads
oracle_patch_download_host: localhost
This is an internal variable for downloading patches. Usually no need to change it.
oracle_plat_lang: 226P
license (MIT)
bartowl github@bartowl.eu
Create Golden-Images from Oracle Database Homes and Oracle Grid-Infrastructure/Restart
2.16.0Set destination directory for Golden-Image extraction.
Variable has no default value.
Crfeate Golden-Image for Database Home.
oraswdb_golden_image_create: false
always
golden_image_db
license (MIT)
[Thorsten Bruhns]
Manage Patch Installation in Database ORACLE_HOMEs.
2.16.0When calling oracle_opatch for DB, decide if analyze stage of opatch/opatchauto should be executed.
Type: boolean
opatch_db_conflict_check: '{{ opatch_conflict_check | bool }}'
Remove following list of directories after DB-Patching when oracle_sw_copy: true:
oraswdb_manage_patches_cleanup_staging: true
Upgrade OPatch without checking for existing version.
Needed for prepatch installations, because Home is not registered in central inventory.
oraswdb_manage_patches_force_opatch_upgrade: false
always
apply_patch_db
autopatch
directories
molecule-idempotence-notest
nfsmountdb
nfsumountdb
ocmconfig
license (MIT)
[Mikael Sandström]
Create Golden-Images from Oracle Grid-Infrastructure/Restart
2.16.0Set destination directory for Golden-Image extraction.
Variable has no default value.
Crfeate Golden-Image for Grid-Infrastructure/Restart.
oraswgi_golden_image_create: false
Filename of created Image archive.
oraswgi_golden_image_filename: >-
{% if oracle_install_option_gi == 'CRS_CONFIG' -%}
gi_{% else %}restart_{% endif %}{{ oracle_install_version_gi | split('.') | first }}.zip
always
golden_image_gi
license (MIT)
[Thorsten Bruhns]
Install/Remove Patches from Oracle Database Homes
2.16.0When calling oracle_opatch for GI, decide if analyze stage of opatch/opatchauto should be executed.
Type: boolean
opatch_gi_conflict_check: '{{ opatch_conflict_check | bool }}'
always
assert
current_opatch_version
license (MIT)
Important
The description for variables is work in progress.!
Meta role used by other roles to share variable defaults.
This role has a dependency to orahost_meta.
There are a lot of variables who are used by orasw_meta
2.16.0This is an internal variable of ansible-oracle.
Do not change it!
_grid_install_user: '{% if role_separation %}{{ grid_user }}{% else %}{{ oracle_user }}{% endif %}'
This is an internal variable of ansible-oracle.
Do not change it!
_oraswgi_meta_configure_cluster: "{{ oracle_install_option_gi == 'CRS_CONFIG' }}"
Apply patches to Grid-Infrastructure/Restart?
Do not disable this!
apply_patches_gi: true
ASMSNMP Password for ASM.
asmmonitorpassword: '{{ default_gipass }}'
Dictionary of lists for opatch and opatchauto patches for Grid-Infrastructure/Restart.
gi_patches: {}
gi_patches_config:
19.16.0.0.220719:
19.3.0.0: # Base Release
opatch_minversion: 12.2.0.1.30
opatchauto:
- patchid: 34130714
patchversion: 19.16.0.0.220719
state: present
path: ./19.16.0.0.220719/gi/34130714/34130714
subpatches:
- 34160635 # OCW Release Update 19.16.0.0.220719
- 33575402 # DBWLM Release Update
- 34139601 # ACFS Release Update 19.16.0.0.220719
- 34318175 # TOMCAT RELEASE UPDATE 19.0.0.0.0
- 34133642 # Database Release Update 19.16.0.0.220719
apply_options:
- "-deleteInactivePatches"
opatch:
# Oracle JavaVM Component Release Update (OJVM RU) 19.16.0.0.220719
stop_processes: true
state: present
path: 19.16.0.0.220719/ojvm/p34086870_190000_Linux-x86-64.zip
apply_options:
- "-force_conflict"
# Oracle Database 19c Important Recommended One-off Patches (Doc ID 555.1)
gi_patches: "{{ gi_patches_config['19.16.0.0.220719'] }}"
Patch Grid-Infrastructure during gridSetup.sh
patch_before_rootsh: true
SYSASM Password for ASM.
sysasmpassword: '{{ default_gipass }}'
always
assert_ansible_oracle
None.
license (MIT)
[Thorsten Bruhns]