1 - Overview

1. Roles

1.1. common

These roles are used to configure settings common to all machines

  • Install some generic packages

  • Configure ntp

1.2. orahost

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)

1.3. orahost-ssh

Configures passwordless ssh between clusternodes if setting up RAC (configure_cluster=True)

  • Uses existing ssh-keys

1.4. orahost-storage

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

1.5. oraswgi-install

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

1.6. oraasm-manage-diskgroups

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

1.7. oraswdb-install

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)

1.8. oradb-manage-db

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

1.9. oraswgi-manage-patches

Manage patches in a GI environment

  • Uses the oracle_opatch module

  • Manages opatchauto type of patches as well as 'normal' one-offs

1.10. oraswdb-manage-patches

Statefully manage patches in a DB environment

  • Uses the oracle_opatch module

  • Manages opatchauto type of patches as well as 'normal' one-offs

1.11. pyoracledb

1.12. orahost-cron

  • Configures cron schedules if needed

1.13. orahost-logrotate

Logs grow. Log rotation solves the problem of always-growing logs.

1.14. oradb-manage-<*>

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

2 - orahost_meta

Meta role used by other roles to share variable defaults.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

asm_diskgroups

ASM 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.

Default value

asm_diskgroups: []

Example usage

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}
   ...

asmadmin_group

The os-group for asmadmin role in Oracle ASM.

Default value

asmadmin_group: asmadmin

asmdba_group

The os-group for asmdba role in Oracle ASM.

Default value

asmdba_group: asmdba

asmoper_group

The os-group for asmoper role in Oracle ASM.

Default value

asmoper_group: asmoper

configure_host_disks

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

Default value

configure_host_disks: false

dba_group

The os-group for sysdba role in Oracle RDBMS.

Default value

dba_group: dba

device_persistence

Defines the device persistency in ansible-oracle.

Values:

  • asmlib
  • asmfd
  • ’’ - no special device configuration

Default value

device_persistence: ''

Example usage

device_persistence: asmlib

device_persistence: asmfd

grid_user

Defines the os-User for Oracle Restart/Grid-Infrastructure, when role_separation is true.

Default value

grid_user: grid

grid_user_home

home directory for grid_user.

Only used, when role_seperation: true which is false by default.

Default value

grid_user_home: /home/grid

oper_group

The os-group for sysoper role in Oracle RDBMS.

Default value

oper_group: oper

oracle_group

The name for the oinstall group.

Default value

oracle_group: oinstall

oracle_inventory_loc

Directory for central Oracle Inventory.

Default value

oracle_inventory_loc: /u01/app/oraInventory

oracle_nr_bg_processes

Estimated number of background processes of an Oracle instance. Used to calculate kernel SEMMNS

Default value

oracle_nr_bg_processes: 130

oracle_rsp_stage

Defines the directory for response files for installation.

There is usually no need to change this variable.

Default value

oracle_rsp_stage: '{{ oracle_stage }}/rsp'

oracle_script_env

(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).

Default value

oracle_script_env: >-
  {{ {'CV_ASSUME_DISTID': orahost_meta_cv_assume_distid | default('', true),
      'TMPDIR': orahost_meta_tmpdir | default('', true)}
     | combine(orahost_meta_java_env) }}

oracle_seclimits

ulimit definition for orahost role.

Default value

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 }}'}

oracle_stage

Defines the base directory for response files, configuration firles etc. for ansible-oracle.

There is usually no need to change this variable.

Default value

oracle_stage: /u01/stage

oracle_tmp_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.

Default value

oracle_tmp_stage: >-
  {% if ansible_fips | default(false) %}{{ oracle_stage }}{%- endif %}/tmp

oracle_user

Defines the os-User for Oracle Database installation. Is also used as the grid owner, when role_separation is false.

Default value

oracle_user: oracle

oracle_user_home

home directory for oracle_user.

Default value

oracle_user_home: /home/oracle

orahost_meta_cv_assume_distid

The variable is used by oracle_script_env and passed to shell: or command: through “environment:” keyword

Riles:

  • Redhat/OL and ansible_distribution_major_version <= 8

OL{{ ansible_distribution_major_version }}

  • Redhat/OL and ansible_distribution_major_version = 9

OL8

  • SuSE

SLES15

Default value

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 %}

orahost_meta_java_env

_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).

Default value

orahost_meta_java_env: >-
  {{ (orahost_meta_java_options | default('', true) | trim | length > 0)
     | ternary({'_JAVA_OPTIONS': orahost_meta_java_options | default('', true) | trim}, {}) }}

orahost_meta_java_options

The variable is used by oracle_script_env and passed to shell: or command: through “environment:” keyword

Default value

orahost_meta_java_options: >-
  {% if oracle_tmp_stage != '/tmp' -%}
  -Djava.io.tmpdir={{ oracle_tmp_stage -}}
  {% endif %}

orahost_meta_tmp_stage_os_managed

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.

Default value

orahost_meta_tmp_stage_os_managed: "{{ (oracle_tmp_stage | trim | regex_replace('/+$', '')) in ['/tmp', '/var/tmp'] }}"

orahost_meta_tmpdir

Default value

orahost_meta_tmpdir: >-
  {% if ansible_fips | default(false) %}{{ oracle_stage }}{%- endif %}/tmp

orahost_min_swap_mb

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

Default value

orahost_min_swap_mb: 16383

orahost_ssh_hostkeytypes

SSH host key types to collect/deploy among hosts Please note, ed25519 is not supported on FIPS enabled systems and though better not collected

Default value

orahost_ssh_hostkeytypes:
  - dsa
  - rsa
  - ecdsa

orahost_ssh_key_size

SSH key size of {{ orahost_ssh_key_type }} key

Default value

orahost_ssh_key_size: 4096

orahost_ssh_key_type

SSH key type for oracle and grid users’ SSH Keys

Default value

orahost_ssh_key_type: rsa

orasw_meta_primary_node

The state of orasw_meta_primary_node is: Single-Instance / Oracle Restart: true Cluster 1st node: true Cluster other nodes: false

Type: boolean

Default value

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 }}

role_separation

Should role separation be used for Oracle Restart/Grid-Infrastructure. See grid_user and oracle_user for Grid-Infrastructure user.

Default value

role_separation: false

scripts_folder

Folder under Oracle user home dir to place scripts in

Default value

scripts_folder: .Scripts

sysctl_kernel_sem_force

Force setting kernel.sem depending on configured instances (collections: oracle_databases, oracle_asm_instance), even if calculated values are lower than current ones

Default value

sysctl_kernel_sem_force: false

Discovered Tags

always

assert_ansible_oracle

Dependencies

  • oraswgi_meta

License

license (MIT)

Author

[Thorsten Bruhns]

3 - ahf

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

ahf_ansible_state_file

File 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.

Default value

ahf_ansible_state_file: '{{ ahf_loc }}/oracle.ahf.ansible.json'

ahf_command_timeout

Timeout in seconds for interactive commands (registration of AHF Fleet Insights).

Default value

ahf_command_timeout: 300

ahf_compliance_autostart

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.

Default value

ahf_compliance_autostart: false

ahf_compliance_settings

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 ;.

Default value

ahf_compliance_settings: {}

Example usage

ahf_compliance_settings:
  autostart_client_oratier1:
    AUTORUN_SCHEDULE: "3 2 * * 1-6"
    COLLECTION_RETENTION: 7
  autostart_client:
    COLLECTION_RETENTION: 30

ahf_data_dir

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.

Default value

ahf_data_dir: "{{ '/opt' if ahf_install_mode == 'root' else oracle_base }}"

ahf_data_dir_min_free_mb

Minimum free space in MB in ahf_data_dir for a new installation.

Default value

ahf_data_dir_min_free_mb: 5120

ahf_fleet_insights_client

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.

Default value

ahf_fleet_insights_client: false

ahf_fleet_insights_force_register

Register again, even when URL and user are unchanged - e.g. after a password change.

Default value

ahf_fleet_insights_force_register: false

ahf_fleet_insights_manage

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.

Default value

ahf_fleet_insights_manage: true

ahf_fleet_insights_os_user

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.

Default value

ahf_fleet_insights_os_user: '{{ oracle_user }}'

ahf_fleet_insights_password

Password of ahf_fleet_insights_user. Use Ansible Vault.

Default value

ahf_fleet_insights_password: ''

ahf_fleet_insights_public_cert

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).

Default value

ahf_fleet_insights_public_cert: ''

Example usage

ahf_fleet_insights_public_cert: "{{ lookup('ansible.builtin.file', inventory_dir + '/files/ahffi_cert.pem') }}"

ahf_fleet_insights_url

Registration URL of AHF Fleet Insights. Shown by ahffi info on the Fleet Insights server - without /ahfservice.

Default value

ahf_fleet_insights_url: ''

Example usage

ahf_fleet_insights_url: https://ahffi.example.com:5005

ahf_fleet_insights_user

Generic registration user of AHF Fleet Insights.

Default value

ahf_fleet_insights_user: ''

ahf_install_mode

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.

Default value

ahf_install_mode: root

ahf_installer_archive

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).

Default value

ahf_installer_archive: ''

Example usage

ahf_installer_archive: AHF-LINUX_v26.10.0.zip

ahf_installer_patterns

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.

Default value

ahf_installer_patterns:
  - AHF-LINUX_v*.zip
  - p30166242_*.zip

ahf_installer_version

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.

Default value

ahf_installer_version: ''

ahf_loc

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.

Default value

ahf_loc: "{{ '/opt' if ahf_install_mode == 'root' else oracle_base }}"

ahf_manage_packages

Install ahf_packages (ahf_install_mode: root only).

Default value

ahf_manage_packages: true

ahf_packages

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.

Default value

ahf_packages:
  - perl
  - openssl
  - unzip

ahf_perl_home

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.

Default value

ahf_perl_home: /usr

ahf_properties

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

Default value

ahf_properties: {}

Example usage

ahf_properties:
  ahf.fleet-insights.upload-only-minimal-files: "false"
  ahf.collectors.alert-history: "on"

ahf_settings_force

Execute all settings and component states, even when they are unchanged since the last run of the role.

Default value

ahf_settings_force: false

ahf_setup_extra_args

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.

Default value

ahf_setup_extra_args: []

Example usage

ahf_setup_extra_args:
  - -tmp_loc
  - /var/tmp

ahf_stage_dir

Directory on the target host for the extraction of the installation media. The directory is removed after the installation.

Default value

ahf_stage_dir: '{{ oracle_stage }}/ahf'

ahf_state

present: install, upgrade and configure AHF.

absent: uninstall AHF (ahfctl uninstall -silent).

Default value

ahf_state: present

ahf_tfa_directories

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.

Default value

ahf_tfa_directories: []

Example usage

ahf_tfa_directories:
  - path: /u01/app/oracle/admin/DB1/adump
    component: RDBMS
    database: db1
    instance: DB1
    collection: noexclusions

ahf_tfa_enabled

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.

Default value

ahf_tfa_enabled: true

ahf_tfa_settings

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.

Default value

ahf_tfa_settings: {}

Example usage

ahf_tfa_settings:
  autodiagcollect: "OFF"
  reposizeMB: 10240
  minfileagetopurge: 48
  ahfnotificationaddress: dba@example.com

ahf_uninstall_delete_repo

Delete the repository in ahf_data_dir during the uninstall (-deleterepo).

Default value

ahf_uninstall_delete_repo: false

ahf_upgrade

Upgrade an existing installation, when the installation media has a newer version.

Default value

ahf_upgrade: true

ahf_verify_signature

Verify the signature of ahf_setup with openssl and the public key from the installation media before the installation.

Default value

ahf_verify_signature: true

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

4 - oradb_manage_db

Create, modify and remove Oracle Databases

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

dbca_templatename

Default template name used by DBCA during execution.

Default value

dbca_templatename: General_Purpose.dbc

hostgroup_hub

Default value

hostgroup_hub: '{{ hostgroup }}-hub'

listener_name

Default name for LISTENER

Default value

listener_name: LISTENER

oracle_gi_cluster_type

Default value

oracle_gi_cluster_type: STANDARD

oradb_manage_db_dbca_ignore_prereq_failure

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).

Default value

oradb_manage_db_dbca_ignore_prereq_failure: '{{ gi_ignoreprereq | default(false) }}'

Discovered Tags

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

Open Tasks

  • (bug): replace netca with new listener_details tasks

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

5 - oradb_manage_redo

Manage redolog groups in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

redolog

Dependencies

  • orasw_meta

License

license (MIT)

Author

  • Mikael Sandström
  • Thorsten Bruhns

6 - orasw_meta

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

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

_www_download_bin

The variable will be removed soon. The download will be changed to get_url to simplify the code.

Default value

_www_download_bin: curl

apply_patches_db

Apply Patches from db_homes_config for installed ORACLE_HOME?

This is a global switch to enable/disable DB-Patching for all ORACLE_HOMEs.

Default value

apply_patches_db: true

assert_db_homes_config

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!

Default value

assert_db_homes_config: true

autostartup_service

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).

Default value

autostartup_service: true

autostartup_service_adopt_interval

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.

Default value

autostartup_service_adopt_interval: 2min

autostartup_service_dependency

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=.

Default value

autostartup_service_dependency: network.target

autostartup_service_mode

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.

Default value

autostartup_service_mode: units

autostartup_service_restart

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.

Default value

autostartup_service_restart: true

Example usage

oracle_databases:
  - oracle_db_name: DB1
    autostartup_service_restart: false

autostartup_service_restart_sec

RestartSec of the database units after a crash (autostartup_service_restart: true), for all databases.

Default value

autostartup_service_restart_sec: 2min

autostartup_service_shutdown_mode

Shutdown mode of the databases (autostartup_service_mode: units): immediate, transactional, normal or abort.

Default value

autostartup_service_shutdown_mode: immediate

autostartup_service_start_timeout

TimeoutStartSec of the database units (autostartup_service_mode: units).

The start of a database with crash recovery can take a long time.

Default value

autostartup_service_start_timeout: 15min

autostartup_service_stop_timeout

TimeoutStopSec of the database units (autostartup_service_mode: units).

systemd does not kill a database after the timeout (KillMode=process).

Default value

autostartup_service_stop_timeout: 15min

db_homes_config

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.

Example usage

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

Example usage

db_homes_installed:
  - home: 19300-base
    apply_patches: true
    state: present

db_standby_config

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.

Example usage

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

dbenvdir

Define the directory for db environment configurations.

Used during installation of ocenv.sh.

Default value

dbenvdir: '{{ oracle_user_home }}/dbenv'

dbpasswords

Define the passwords for DB-Users in nonCDB, CDB and PDBs.

Default value

dbpasswords: {}

Example usage


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

default_dbpass

Set the default password for all DB-Users not defined in dbpasswords.

Default value

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 %}

Example usage

default_dbpass: topeS3cr§t

deploy_ocenv

Install the ocenv.sh environment script.

Source is from: https://github.com/opitzconsulting/oracle-scripts

Default value

deploy_ocenv: true

disable_ee_options

Global switch to define if Oracle options should be changed in binary for Enterprise-Edition.

Default value

disable_ee_options: 'true'

Example usage

disable_ee_options: true # change options in binary
disable_ee_options: false # do not change options in binary

get_url_ssl_client_cert

PEM formatted certificate chain file to be used for SSL client authentication with ansible.builtin.get_url

Type: path

Example usage

/etc/pki/ca-trust/source/anchors/client-certchain.pem

get_url_ssl_client_key

PEM formatted file that contains your private key to be used for SSL client authentication with ansible.builtin.get_url

Type: path

Example usage

/etc/pki/tls/private/client-cert.pem

grid_base

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.

Default value

grid_base: >-
  {% if oracle_install_option_gi == 'CRS_CONFIG' -%}
  /u01/app/grid/base{% else %}{{ oracle_base }}{% endif %}

hostgroup

Defines the hostgroup with nodes for a Grid-Infrastructure Cluster.

The variable needs a refactoring.

Default value

hostgroup: '{{ group_names[0] }}'

http_proxy

Define the http proxy for downloads

Default value

http_proxy: ''

https_proxy

Define the https proxy for downloads

Default value

https_proxy: ''

install_from_nfs

Mount NFS-Server for installation media?

nfs_server_sw and nfs_server_sw_path are needed, when install_from_nfs: true

Default value

install_from_nfs: false

is_sw_source_local

Default value

is_sw_source_local: true

listener_port

The global default port for listener when no dedicated port is configured in listener itself.

Default value

listener_port: 1521

nfs_server_sw

Defines the NFS-Server used to mount the installation media from.

Example usage

nfs_server_sw: nfs-server.example.com

nfs_server_sw_path

Path to installation medias on NFS-Ser.

Important

ansible-oracle expects a fixed structure for installation media and patches!

Example usage

nfs_server_sw_path: /orasw

no_proxy

Define no_proxy list für downlads.

Default value

no_proxy: ''

ocenv_bashrc_init

Add ocenv.sh to bashrc of oracle user?

deploy_ocenv: true is needed for the installation.

Default value

ocenv_bashrc_init: true

ocenv_bashrc_init_section

Define the conntents to add to .bashr when ocenv_bashrc_init: true.

Default value

ocenv_bashrc_init_section: |
  echo "execute ocenv to source Oracle Environment"
  alias ocenv='. "{{ dbenvdir }}/ocenv"'

opatch_conflict_check

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

Default value

opatch_conflict_check: true

oracle_all_editions_options_state

Intended state of edition independent database options, as defined in {{ oracle_all_editions_options }}

Default value

oracle_all_editions_options_state:
  - {option: dnfs, enabled: false}
  - {option: uniaud, enabled: false}

oracle_asm_disk_string

Default value

oracle_asm_disk_string: ORCL:*

oracle_base

ORACLE_BASE for Oracle RDBMS

Default value

oracle_base: /u01/app/oracle

oracle_databases

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.

Example usage


# 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

oracle_dbf_dir_fs

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.

Default value

oracle_dbf_dir_fs: /u02/oradata/

oracle_ee_options_112

Define the enabled/disabled options for 11.2 binaries.

Default value

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}

oracle_ee_options_121

Define the enabled/disabled options for 12.1 binaries.

Default value

oracle_ee_options_121:
  - {option: dm, state: false}
  - {option: olap, state: false}
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_ee_options_122

Define the enabled/disabled options for 12.2 binaries.

Default value

oracle_ee_options_122:
  - {option: oaa, state: false}
  - {option: olap, state: false}
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_ee_options_183

Define the enabled/disabled options for 18c binaries.

Default value

oracle_ee_options_183:
  - {option: oaa, state: false}
  - {option: olap, state: false}
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_ee_options_193

Define the enabled/disabled options for 19c binaries.

Default value

oracle_ee_options_193:
  - {option: oaa, state: false}
  - {option: olap, state: false}
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_ee_options_213

Define the enabled/disabled options for 21c binaries.

Default value

oracle_ee_options_213:
  - {option: oaa, state: false}
  - {option: olap, state: false}
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_ee_options_261

Define the enabled/disabled options for 26ai binaries.

Default value

oracle_ee_options_261:
  - {option: partitioning, state: false}
  - {option: rat, state: false}

oracle_home_gi_cl

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.

Default value

oracle_home_gi_cl: /u01/app/{{ oracle_install_version_gi }}/grid

oracle_home_gi_so

Custom setting for CRS_HOME when Oracle Restart is installed.

The variable is used as a default for the internal variable oracle_home_gi.

Default value

oracle_home_gi_so: '{{ oracle_base }}/{{ oracle_install_version_gi }}/grid'

oracle_hostname

Grid-Infrastructure nodename.

Used as hostname for all oradb_manage_-connections and as hostname in RDBMS installation.

Default value

oracle_hostname: '{{ ansible_fqdn }}'

oracle_install_option_gi

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

Default value

oracle_install_option_gi: ''

Example usage


oracle_install_option_gi: ''

oracle_install_option_gi: CRS_CONFIG

oracle_install_option_gi: HA_CONFIG

oracle_install_version_gi

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).

Default value

oracle_install_version_gi: 26.1.0.0

Example usage


oracle_install_version_gi: 26.1.0.0

oracle_install_version_gi: 19.3.0.0

oracle_opatch_patch

Mapping from OPatch ZIP-archive to Oracle Release.

The variable is configured for all supported Oracle Release by default.

Default value

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

oracle_pdbs

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!

Example usage

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

oracle_profile_template

Define which template is used to create .profile scripts.

Important

This variable is only used when deploy_ocenv: false. The default is true.

Default value

oracle_profile_template: dotprofile-home.j2

oracle_reco_dir_fs

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.

Default value

oracle_reco_dir_fs: /u02/fra/

oracle_stage_remote

Default value

oracle_stage_remote: '{{ oracle_stage }}'

oracle_sw_patches

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.

Default value

oracle_sw_patches: []

Example usage

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

oracle_sw_source_local

Define the directory when `` is set.

The archives are directly read from this directory.

Default value

oracle_sw_source_local: /tmp

oracle_sw_source_www

Define the URL for downloading installation medias and patches from a central server during software installation and patching.

Default value

oracle_sw_source_www: http://www/orasw

orasw_meta_assert_db_standby_config

Switch for enable/disable assert on db_standby_config and standby_config in oracle_databases.

Please change the state only when really needed!

Default value

orasw_meta_assert_db_standby_config: true

orasw_meta_assert_oracle_databases

Switch for enable/disable assert on oracle_databases.

Please change the state only when really needed!

Default value

orasw_meta_assert_oracle_databases: true

orasw_meta_cluster_hostgroup

Ansible Inventory hostgroup for RAC-Cluster.

Default value

orasw_meta_cluster_hostgroup: ''

orasw_meta_forced_lang

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.

Default value

orasw_meta_forced_lang: en_US.UTF-8

proxy_env

This is an internal variable for downloading patches. Usually no need to change it.

Default value

proxy_env:
  http_proxy: '{{ http_proxy }}'
  https_proxy: '{{ https_proxy }}'
  no_proxy: '{{ no_proxy }}'

set_oracle_all_editions_options_state

Switch to globally enable/disable linking of edition independent database options

Default value

set_oracle_all_editions_options_state: true

shell_aliases

Define shell Aliases for oracle user.

Default value

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'

shell_ps1

Configure shell prompt for OS-User oracle

Default value

shell_ps1: "'[$LOGNAME'@'$ORACLE_SID `basename $PWD`]$'"

ulimit_systemd_mapping

Mapping of oracle_seclimits to the limits of the systemd units for the autostart.

Default value

ulimit_systemd_mapping:
  hard nproc: {name: LimitNPROC}
  hard nofile: {name: LimitNOFILE}
  hard stack: {name: LimitSTACK, sysctlfactor: 1024}
  hard memlock: {name: LimitMEMLOCK, sysctlfactor: 1024}

use_proxy

Enable Proxy for Download

Default value

use_proxy: false

Discovered Tags

always

assert_ansible
 Assert version of Ansible Core

assert_ansible_oracle
 Assert inventory variables from ansible-oracle

nfsmountdb

nfsumountdb

Open Tasks

  • (bug): add assert for install_from_nfs, nfs_server_sw, nfs_server_sw_path
  • (bug): why do we need oracle_stage_remote?
  • (bug): is_sw_source_local really needed with default or as dependency from other vars?
  • (bug): Open Issue with changed behavior for _oraswgi_meta_configure_cluster
  • (bug): Variable hosgroup needs a refactoring
  • (bug): Check if shell_ps1 is used for oracle and grid
  • (bug): Check when shell_aliases is used in ansible-oracle and change description
  • (bug): check if assert for deploy_ocenv + ocenv_bashrc_init is existing
  • (information): variable description is missing
  • (information): variable description is missing
  • (information): db_homes_installed not used for a long time…
  • (information): variable description is missing
  • (information): variable description is missing
  • (todo): Remove variable _www_download_bin

Dependencies

  • orahost_meta
  • orasw_meta_internal

License

license (MIT)

Author

[Thorsten Bruhns]

7 - oraswgi_install

Install Grid Infrastructure / ORacle Restart software.

This role has a dependency to orahost_meta and orasw_meta for default parameter.

Known Issues from Oracle:

  • TOP Note: Solutions for Typical Grid Infrastructure/RAC Database runInstaller/DBCA for RAC Issues (Doc ID 1056713.1)
  • INS-06006 GI RunInstaller Fails If OpenSSH Is Upgraded to 8.x (Doc ID 2555697.1)

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

cvuqdisk_rpm

Name of RPM for cvuqdisk.

RPM is installed from {{ oracle_home_gi }}/cv/rpm/

Default value

cvuqdisk_rpm: cvuqdisk-1.0.10-1.rpm

default_dbpass

Default value

default_dbpass: '{% if item.0.oracle_db_passwd is defined %}{{ item.0.oracle_db_passwd }}{% else %}Oracle123{% endif %}'

default_gipass

Default password for Grid-Infrastructure and ASM-Users.

Important

It is mandatory to set this variable in your inventory!

Default value

default_gipass: ''

endoracle_scan_port

Port for SCAN-Listener

gi_ignoreprereq

false => Do not ignore failed runcluvfy.sh true => Ignore failed runcluvfy.sh

Default value

gi_ignoreprereq: false

oracle_asm_init_dg

1st Diskgroup where ASM SPFile is placed.

Default value

oracle_asm_init_dg: crs

oracle_asm_storage_option

Default value

oracle_asm_storage_option: "{% if oracle_install_version_gi is version('12.2', '>=') %}FLEX_ASM_STORAGE{% else %}LOCAL_ASM_STORAGE{% endif %}"

oracle_cluster_mgmdb

Create _MGMTBD on cluster.

Default value

oracle_cluster_mgmdb: false

oracle_cluster_name

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!

Default value

oracle_cluster_name: '{{ orasw_meta_cluster_hostgroup }}'

oracle_gi_cluster_type

Define clusterware type.

Default value

oracle_gi_cluster_type: STANDARD

oracle_gi_gns_subdomain

Define ths GNS subdomain for Cluster

oracle_gi_gns_vip

Define GNS VIP for Clusterware.

Default value

oracle_gi_gns_vip:

oracle_gi_nic_priv

Name of private network interface.

Default value

oracle_gi_nic_priv: eth1

oracle_gi_nic_pub

Name of public network interface.

Default value

oracle_gi_nic_pub: eth0

oracle_ic_net

Defines the network for the interconnect.

Important!

Only used, when configure_interconnect=true and ansible_os_family='RedHat' during cluster installations.

Default value

oracle_ic_net: 3.3.3.{{ ansible_all_ipv4_addresses[0].split(".")[-1] }}

oracle_scan

SCAN DNS-Name

oracle_scan_port

Default value

oracle_scan_port: 1521

oracle_sw_image_gi

List of version sepcific GI installation images

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

Default value

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}

Example usage

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

oracle_vip

suffix added to hostnames for VIPs.

{{ 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!

Default value

oracle_vip: -vip

oraswgi_install_remove_obsolete_homes

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.

Default value

oraswgi_install_remove_obsolete_homes: false

run_configtoolallcommand

Run configtoolcommand during installation.

Do not disable this!

Default value

run_configtoolallcommand: true

Discovered Tags

always

asmfd

crsctl

cvuqdisk

directories

dsset

glogingi

nfsmountdb

nfsumountdb

opatchls

oragridinstall

oragridsw

oragridswunpack

responsefileconfigtool

responsefilegi

runcluvfy

runconfigtool

runroot

updatenodelist

Open Tasks

  • (bug): ConfigTools should not depend on olr.loc…
  • (bug): ConfigTools should not depend on olr.loc…
  • (bug): ConfigTools should not depend on olr.loc…
  • (information): add selectattr to asm_diskgroups
  • (information): Check if path for patches is ok with patch_id/patch_id
  • (information): add selectattr to asm_diskgroups
  • (information): Check if path for patches is ok with patch_id/patch_id
  • (information): add selectattr to asm_diskgroups
  • (information): Check if path for patches is ok with patch_id/patch_id

Dependencies

  • orahost_meta
  • orasw_meta
  • oraswgi_meta

License

license (MIT)

Author

Mikael Sandström, Thorsten Bruhns

8 - ahf_fleet_insights

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

ahf_fi_cert_days

Validity of the generated certificate in days.

Default value

ahf_fi_cert_days: 730

ahf_fi_cert_file

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.

Default value

ahf_fi_cert_file: ''

ahf_fi_cert_generate

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.

Default value

ahf_fi_cert_generate: true

ahf_fi_cert_key_file

Private key (PEM) of ahf_fi_cert_file on the Ansible controller.

Default value

ahf_fi_cert_key_file: ''

ahf_fi_cert_names

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.

Default value

ahf_fi_cert_names: '{{ [ansible_hostname, ansible_fqdn] | unique }}'

ahf_fi_clamscan

Path to clamscan for a virus scan of the uploaded collections (CLAMSCAN). Increases the processing time.

Default value

ahf_fi_clamscan: ''

ahf_fi_db_host

Hostname of the repository database (DB_HOST). Oracle Database 19c or newer.

Default value

ahf_fi_db_host: '{{ inventory_hostname }}'

ahf_fi_db_password

Password of ahf_fi_db_user (DB_PASSWORD). Use Ansible Vault.

Default value

ahf_fi_db_password: ''

ahf_fi_db_port

Listener port of the repository database (DB_PORT).

Default value

ahf_fi_db_port: 1521

ahf_fi_db_service

Service name of the repository database (DB_SERVICE).

Default value

ahf_fi_db_service: ''

ahf_fi_db_user

Schema user in the repository database (DB_USER). Create it with create_db_user.sql from the installation media.

Default value

ahf_fi_db_user: AHFFI

ahf_fi_db_wallet

Wallet for the connection to the repository database (DB_WALLET).

Default value

ahf_fi_db_wallet: ''

ahf_fi_firewall

Open ahf_fi_port in firewalld, when firewalld is running.

Default value

ahf_fi_firewall: true

ahf_fi_install_dir

Installation directory of Fleet Insights (INSTALL_DIR). Plan 4 GB per registered cluster.

Default value

ahf_fi_install_dir: '{{ oracle_base }}/ahffi'

ahf_fi_install_user

OS user for the installation and the processes of Fleet Insights. The installer fails with root.

Default value

ahf_fi_install_user: '{{ oracle_user }}'

ahf_fi_installer_archive

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.

Default value

ahf_fi_installer_archive: ''

Example usage

ahf_fi_installer_archive: AHFFI-LINUX_v25.2.0.zip

ahf_fi_instant_client

Directory of Oracle Instant Client (INSTANT_CLIENT).

Default value

ahf_fi_instant_client: /usr/lib/oracle/23/client64

ahf_fi_instantclient_repo

Yum repository for Oracle Instant Client on Oracle Linux. Empty: no repository is configured.

Default value

ahf_fi_instantclient_repo: >-
  https://yum.oracle.com/repo/OracleLinux/OL{{ ansible_distribution_major_version }}/oracle/instantclient23/x86_64/

ahf_fi_java_home

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.

Default value

ahf_fi_java_home: ''

ahf_fi_manage_packages

Install the required packages (ahf_fi_packages) and the yum repository for Oracle Instant Client (ahf_fi_instantclient_repo).

Default value

ahf_fi_manage_packages: true

ahf_fi_packages

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).

Default value

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

ahf_fi_port

Port of the web application (WEBAPP_PORT, 1024 - 49151). Must be reachable from all AHF clients and the browsers.

Default value

ahf_fi_port: 5005

ahf_fi_public_cert_fetch

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.

Default value

ahf_fi_public_cert_fetch: ''

Example usage

ahf_fi_public_cert_fetch: "{{ inventory_dir }}/files/ahffi_cert.pem"

ahf_fi_registration_password

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.

Default value

ahf_fi_registration_password: ''

ahf_fi_registration_user

Generic registration user for the AHF clients (GENERIC_REGISTRATION_USER). Created by the installer, when user and password are set.

Default value

ahf_fi_registration_user: ''

ahf_fi_stage_dir

Directory on the target host for the installation media. The directory is removed after the installation, because the properties file contains passwords.

Default value

ahf_fi_stage_dir: '{{ oracle_stage }}/ahffi'

ahf_fi_start_timeout

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.

Default value

ahf_fi_start_timeout: 300

ahf_fi_upgrade

Patch an existing installation, when the installation media has a newer version.

Default value

ahf_fi_upgrade: true

ahf_fi_verify_signature

Verify the signature of the installation media with openssl.

Default value

ahf_fi_verify_signature: true

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

9 - orasw_meta_internal

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

_db_password_cdb

The variable is internal used only.

Do not set it in inventory!

Default value

_db_password_cdb: _internal_used_

_db_password_pdb

The variable is internal used only.

Do not set it in inventory!

Default value

_db_password_pdb: _internal_used_

_db_service_name

The variable is internal used only.

Do not set it in inventory!

Default value

_db_service_name: _internal_used_

_db_service_pdb

The variable is internal used only.

Do not set it in inventory!

Get the service_name for a PDB.

Requires opdb as loop_var.

Default value

_db_service_pdb: _internal_used_

_db_unique_name_for_pdb

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.

Default value

_db_unique_name_for_pdb: _internal_used_

_grid_env

The variable is used for shell, command tasks to set environment Variables.

Do not set it in inventory!

Default value

_grid_env:
  ORACLE_HOME: '{{ oracle_home_gi }}'
  LD_LIBRARY_PATH: '{{ oracle_home_gi }}/lib'

_listener_port_cdb

The variable is internal used only.

Do not set it in inventory!

Default value

_listener_port_cdb: _internal_used_

_listener_port_pdb

The variable is internal used only.

Do not set it in inventory!

Default value

_listener_port_pdb: _internal_used_

_odb_loop_helper

The variable is internal used only.

Do not set it in inventory!

Default value

_odb_loop_helper: _internal_used_

_odb_standby_archivelog_deletion_policy

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).

Default value

_odb_standby_archivelog_deletion_policy: _internal_used_

_odb_standby_config

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.

Default value

_odb_standby_config: _internal_used_

_odb_standby_create_method

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.

Default value

_odb_standby_create_method: _internal_used_

_odb_standby_member

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).

Default value

_odb_standby_member: _internal_used_

_odb_standby_others

The variable is internal used only.

Do not set it in inventory!

All other members of _odb_standby_config (without _odb_standby_member).

Default value

_odb_standby_others: _internal_used_

_opdb_home

Default value

_opdb_home: "{{ (oracle_databases | selectattr('oracle_db_name', 'equalto', _opdb_loop_helper['cdb']))[0]['home'] }}"

_opdb_loop_helper

The variable is internal used only.

Do not set it in inventory!

Default value

_opdb_loop_helper: _internal_used_

_oracle_all_editions_options

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

_oracle_db_instance_name

The variable is internal used only.

Do not set it in inventory!

Default value

_oracle_db_instance_name: _internal_used_

_oracle_db_unique_name

The variable is internal used only.

Do not set it in inventory!

Default value

_oracle_db_unique_name: _internal_used_

_oracle_ee_opiton_dict

This is an internal variable in ansible-oracle.

IMPORTANT

Do not set this variable in inventory, set_fact …!

Default value

_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 …!

Default value

_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\.

_oracle_ee_options_valid

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 …!

Default value

_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]

_oracle_env

The variable is used for shell, command tasks to set environment Variables.

Do not set it in inventory!

Default value

_oracle_env:
  ORACLE_HOME: '{{ _oracle_home_db }}'
  LD_LIBRARY_PATH: '{{ _oracle_home_db }}/lib'

_oracle_env_pdb

Default value

_oracle_env_pdb:
  ORACLE_HOME: '{{ _oracle_home_db_pdb }}'
  LD_LIBRARY_PATH: '{{ _oracle_home_db_pdb }}/lib'

_oracle_home_db

This is an internal variable in ansible-oracle.

Do not set it in inventory!

Default value

_oracle_home_db: _internal_used_

_oracle_home_db_pdb

Default value

_oracle_home_db_pdb: "{{ db_homes_config[_opdb_home]['oracle_home'] }}"

_orasw_meta_standby_sid

The variable is internal used only.

Do not set it in inventory!

ORACLE_SID of the current database (_odb_loop_helper).

Default value

_orasw_meta_standby_sid: _internal_used_

cluster_master

Default value

cluster_master: '{{ ansible_play_batch[0] }}'

db_mode

Default value

db_mode: sysdba

db_password

Default value

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 %}

db_service_name

Deprecated: since v4.0.0

Default value

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

Default value

db_user: sys

db_version

This is an internal variable in ansible-oracle.

IMPORTANT

Do not set this variable in inventory, set_fact …!

Deprecated: since v4.0.0

Default value

db_version: _unset_

grid_env

The variable is used for shell, command tasks to set environment Variables.

Do not set it in inventory!

Deprecated: since v4.0.0

Default value

grid_env:
  ORACLE_HOME: '{{ oracle_home_gi }}'
  LD_LIBRARY_PATH: '{{ oracle_home_gi }}/lib'

listener_home

Deprecated: since v4.0.0

Default value

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 -%}"

listener_port_template

Deprecated: since v4.0.0

Default value

listener_port_template: '{% if item.listener_port is defined %}{{ item.listener_port }}{% else %}{{ listener_port }}{% endif %}'

listener_protocols

Deprecated: since v4.0.0

Default value

listener_protocols: TCP

ocm_response_file

Default value

ocm_response_file: '{{ oracle_patch_stage }}/{{ db_version }}/ocm.rsp'

oracle_all_editions_options

Default value

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

oracle_env

The variable is used for shell, command tasks to set environment Variables.

Do not set it in inventory!

Deprecated: since v4.0.0

Default value

oracle_env:
  ORACLE_HOME: '{{ oracle_home_db }}'
  LD_LIBRARY_PATH: '{{ oracle_home_db }}/lib'

oracle_env_lsnrctl

The variable is used for shell, command tasks to set environment Variables.

Do not set it in inventory!

Deprecated: since v4.0.0

Default value

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'

oracle_home_db

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

Default value

oracle_home_db: _unset_

oracle_home_gi

Custom setting for CRS_HOME.

The default value depends on _oraswgi_meta_configure_cluster and oracle_home_gi_cl or oracle_home_gi_so.

Default value

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

Default value

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

Default value

oracle_patch_stage: '{{ oracle_stage }}/patches'

oracle_patch_stage_remote

Default value

oracle_patch_stage_remote: '{{ oracle_stage_remote }}/patches'

oracle_stage_install

This is an internal variable. Do not set it in Inventory.

Default value

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

Default value

oracle_sw_copy: '{{ not (install_from_nfs | bool) }}'

oracle_sw_extract_path

Default value

oracle_sw_extract_path: "{%- if '18' in db_version -%}{{ oracle_home_db }}{%- else -%}{{ oracle_stage }}/{{ item[0].version }}{%- endif -%}"

oracle_sw_unpack

Default value

oracle_sw_unpack: '{{ not (install_from_nfs | bool) }}'

Dependencies

None.

License

license (MIT)

Author

[Thorsten Bruhns]

10 - oraswdb_install

Install Oracle Database Software

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

autostartup_service

Force 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.

configure_oracle_profile

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!

Default value

configure_oracle_profile: true

glogin_default_cdb

content of glogin.sql for CDB/PDB databases

Default value

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

Default value

glogin_default_nocdb:
  - set sqlprompt "_user @ _connect_identifier:>"
  - set time on

hostgroup

Default value

hostgroup: '{{ group_names[0] }}'

hostgroup_hub

Default value

hostgroup_hub: '{{ hostgroup }}-hub'

hostgroup_leaf

Default value

hostgroup_leaf: '{{ hostgroup }}-leaf'

hostinitdaemon

The start daemon of the OS.

Usually no need to change this value!

Default value

hostinitdaemon: '{{ ansible_service_mgr }}'

oracle_ee_options

Default value

oracle_ee_options: "{{ _oracle_ee_opiton_dict[db_homes_config[dbh.home]['version']] }}"

oracle_sw_image_db

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

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

Default value

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

Example usage

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

Default value

oraswdb_install_forcechopt: false

oraswdb_install_remove_install_images

Remove installation media from staging after installation when oracle_sw_copy: true.

Default value

oraswdb_install_remove_install_images: true

Discovered Tags

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

Open Tasks

  • (information): hostgroup, hostgroup_hub, hostgroup_leaf needs some more tests

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

11 - oradb_rman

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oradb_rman_assert_control_file_record_keep_time

Assert 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.

Default value

oradb_rman_assert_control_file_record_keep_time: true

oradb_rman_autofs

Configure autofs for RMAN Backups?

Default value

oradb_rman_autofs: '{{ rmanautofs | default(false) }}'

oradb_rman_channel_disk_default

Defines the format for disk target in RMAN-Templates from role.

Used for CONFIGURE CHANNEL DEVICE TYPE DISK <value> => the value starts with format.

Default value

oradb_rman_channel_disk_default: >-
  {% set __channel_disk_default = "format '/u10/rmanbackup/%d/%d_%T_%U'" -%}
  {{ rman_channel_disk_default | default(__channel_disk_default) -}}

oradb_rman_controlfile_autobackup_disk_default

Defines the contolfile autobackup target directory for the RMAN-Templates from role.

Default value

oradb_rman_controlfile_autobackup_disk_default: >-
  {% set __autobackup_disk_default = "'/u10/rmanbackup/%d/%d_%F'" -%}
  {{ rman_controlfile_autobackup_disk_default | default(__autobackup_disk_default) -}}

oradb_rman_cron_mkjob

Add mk-job to all cronjobs in /etc/cron.d for RMAN backups.

This is only needed when RMAN backups are monitored by checkmk.

Default value

oradb_rman_cron_mkjob: '{{ rman_cron_mkjob | default(false) }}'

oradb_rman_cronfile

Name for file for crontab in /etc/cron.d

Default value

oradb_rman_cronfile: oracle_rman_ansible

oradb_rman_log_dir

Lgofiledirectory for rman_wrapper.sh.

Default value

oradb_rman_log_dir: "{{ rman_log_dir | default((odb.0 | default(odb)).rman_log_dir | default(oracle_base + '/rman/log')) }}"

oradb_rman_log_retention

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.

Default value

oradb_rman_log_retention: 30

oradb_rman_retention_policy_default

Defines the policy for the RMAN-Templates from role.

Default value

oradb_rman_retention_policy_default: "{{ rman_retention_policy_default | default('RECOVERY WINDOW OF 14 DAYS') }}"

oradb_rman_script_dir

Directory for *.rman-Files.

Default value

oradb_rman_script_dir: "{{ rman_script_dir | default((odb.0 | default(odb)).rman_script_dir | default(oracle_base + '/rman')) }}"

oradb_rman_tns_admin

TNS_ADMIN for rman_wrapper.sh. This is needed for RMAN-Catalogconnections.

Default value

oradb_rman_tns_admin: "{{ rman_tns_admin | default(oracle_base + '/rman/network/admin') }}"

oradb_rman_tnsnames_installed

Defines custom entries in tnsnames.ora in oradb_rman_tns_admin.

Format is same as tnsnames_installed.

Example usage

oradb_rman_tnsnames_installed:
  - home: db19-si-ee
    tnsname: orclpdb
    state: present

oradb_rman_wallet_loc

Directory for Oracle wallet.

Default value

oradb_rman_wallet_loc: "{{ rman_wallet_loc | default(oracle_base + '/rman/network/wallet') }}"

oradb_rman_wallet_password

Password for Orale wallet.

Default value

oradb_rman_wallet_password: "{{ rman_wallet_password | default('oracleWallet1') }}"

Discovered Tags

always

assert

assert_rman_tns_admin

autofs

notest

rmancfg

rmancopy

rmancron

rmanexecute

rmanregister

tns

wallet

wallet_contents

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

12 - oradb_standby

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-oracle
  • custom: tasks file from create_tasks_file

The inventory structure is described in doc/guides/standby_databases.adoc.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oradb_standby_broker_create

Create 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.

Default value

oradb_standby_broker_create: true

oradb_standby_rman_compressed

Use USING COMPRESSED BACKUPSET for DUPLICATE ... FROM ACTIVE DATABASE. false uses USING BACKUPSET.

Default value

oradb_standby_rman_compressed: true

oradb_standby_rman_logdir

Directory for the logfiles of RMAN DUPLICATE.

Default value

oradb_standby_rman_logdir: '{{ oracle_base }}/cfgtoollogs/oradb_standby'

oradb_standby_rman_parallel

Number of RMAN channels on the primary and on the standby database for create_method: rman_duplicate_active.

Default value

oradb_standby_rman_parallel: 2

oradb_standby_start_apply

Start Redo Apply (RECOVER MANAGED STANDBY DATABASE DISCONNECT) after the creation of the standby database.

Default value

oradb_standby_start_apply: true

Discovered Tags

oradb_standby

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

  • Thorsten Bruhns

13 - common

sets up the host generic stuff

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

common_packages

This is an internal variable only. Do not define it!

Default value

common_packages: _unset_

common_packages_el10

List of RPMs for RHEL10 or OL10

Default value

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

common_packages_el6

List of RPMs for RHEL6 or OL6

Default value

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

common_packages_el7

List of RPMs for RHEL7 or OL7

Default value

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

common_packages_el8

List of RPMs for RHEL8 or OL8

Default value

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

common_packages_el9

List of RPMs for RHEL9 or OL9

Default value

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

common_packages_sles

List of RPMs for SuSE Linux Enterprise Server

Default value

common_packages_sles:
  - screen
  - procps
  - module-init-tools
  - ethtool
  - bc
  - bind-utils
  - make
  - sysstat
  - unzip
  - chrony
  - expect
  - lvm2
  - autofs

configure_epel_repo

Default value

configure_epel_repo: true

configure_motd

Configure Message of the day

Default value

configure_motd: true

configure_ntp

Configure ntpd or chrony on target system. The chrony or ntp is automatically chosen by ntp_type.

Default value

configure_ntp: true

configure_public_yum_repo

Default value

configure_public_yum_repo: true

epel10_rpm

URL for epel-release-latest-10.noarch.rpm

Default value

epel10_rpm: oracle-epel-release-el10

epel6_rpm

Url for epel-release-latest-6.noarch.rpm

Default value

epel6_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

epel7_rpm

Url for epel-release-latest-7.noarch.rpm

Default value

epel7_rpm: https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm

epel8_rpm

Url for epel-release-latest-8.noarch.rpm

Default value

epel8_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

epel9_rpm

Url for epel-release-latest-9.noarch.rpm

Default value

epel9_rpm: oracle-epel-release-el9

http_proxy

Define the http proxy for downloads

Default value

http_proxy: ''

https_proxy

Define the https proxy for downloads

Default value

https_proxy: ''

install_os_packages

Default value

install_os_packages: true

motd_template

Used templatename for Message of the day

Default value

motd_template: motd.j2

no_proxy

Define no_proxy list für downlads.

Default value

no_proxy: ''

ntp_type

This is an internal variable only. Do not define it!

Default value

ntp_type: _unset_

ol6_repo_file

The variable is used to cleanup the yum repolist for old installations.

Default value

ol6_repo_file: public-yum-ol6.repo

ol7_repo_file

The variable is used to cleanup the yum repolist for old installations.

Default value

ol7_repo_file: public-yum-ol7.repo

proxy_env

This is an internal variable for downloading patches. Usually no need to change it.

Default value

proxy_env:
  http_proxy: '{{ http_proxy }}'
  https_proxy: '{{ https_proxy }}'
  no_proxy: '{{ no_proxy }}'

use_proxy

Enable Proxy for Download

Default value

use_proxy: false

Discovered Tags

common_assert

commonpackages

epelrepo

motd

olrepo

Dependencies

  • global_handlers

License

license (MIT)

Author

[Mikael Sandström]

14 - pyoracledb

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

pyoracledb_extra_args

Define 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.

Default value

pyoracledb_extra_args: ''

pyoracledb_http_proxy

Define the http_proxy for the pip installation.

Needed when pyoracledb_use_proxy: true.

Example usage

pyoracledb_http_proxy: proxy.example:3128

pyoracledb_install

Install python-oracledb?

Default value

pyoracledb_install: true

pyoracledb_umask

Define umask for pip installation of python-oracledb

pyoracledb_use_proxy

Use a http_proxy for the pip installation

Default value

pyoracledb_use_proxy: false

pyoracledb_version

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).

Default value

pyoracledb_version: 26.1.0

pyoracledb_version_py36

Version of python-oracledb for Python 3.6 (Oracle Linux / RHEL 8, SLES 15). Last release for Python 3.6, not updated by renovate.

Default value

pyoracledb_version_py36: 1.4.2

pyoracledb_version_py37

Version of python-oracledb for Python 3.7. Last release for Python 3.7, not updated by renovate.

Default value

pyoracledb_version_py37: 2.3.0

pyoracledb_version_py38

Version of python-oracledb for Python 3.8. Last release for Python 3.8, not updated by renovate.

Default value

pyoracledb_version_py38: 3.0.0

pyoracledb_version_py39

Version of python-oracledb for Python 3.9 (Oracle Linux / RHEL 9). Last release for Python 3.9, not updated by renovate.

Default value

pyoracledb_version_py39: 4.0.2

pyoracledb_wheel_dir

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).

  • local directory on the Ansible controller, copied to <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).
  • URL (http://, https://) of a page with links to the wheel files, used directly by pip

The 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

Example usage

pyoracledb_wheel_dir: /sw/python-oracledb

Discovered Tags

pyoracledb

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

15 - orahost

Role to configure the hostsystem for ansible-oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

asmlib_rpm

Install 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

Default value

asmlib_rpm: Value from `asmlib_rpm_el6`, `asmlib_rpm_el7` or `asmlib_rpm_el8`

asmlib_rpm_el6

Name / Url for rpm oracleasm-support for RHEL6/OL6.

Default value

asmlib_rpm_el6: http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm

asmlib_rpm_el7

Name / Url for rpm oracleasm-support for RHEL7/OL7.

Default value

asmlib_rpm_el7: http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el7.x86_64.rpm

asmlib_rpm_el8

Name / Url for rpm oracleasm-support for RHEL8/OL8.

Default value

asmlib_rpm_el8: https://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.17-1.el8.x86_64.rpm

asmlib_rpm_sles

Name / Url for rpm oracleasm-support for SLES.

Default value

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

asmlibsupport_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.

Default value

asmlibsupport_rpm: Value from `asmlibsupport_rpm_el6`, `asmlibsupport_rpm_el7` or `asmlibsupport_rpm_el8`

asmlibsupport_rpm_el6

Default value

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

Default value

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

Default value

asmlibsupport_rpm_el8: https://yum.oracle.com/repo/OracleLinux/OL8/latest/x86_64/getPackage/oracleasm-support-2.1.11-2.el8.x86_64.rpm

configure_etc_hosts

Add {{ ansible_hostname }} {{ ansible_fqdn }} to /etc/hosts`?

Default value

configure_etc_hosts: false

configure_hugepages

Configure Hugepages?

Default value

configure_hugepages: true

configure_hugepages_by

Defines if percent_hugepages or size_in_gb_hugepages is used to define the Hugepages. Allowed values: percentage or memory.

Default value

configure_hugepages_by: memory

Example usage

configure_hugepages_by: memory

configure_hugepages_by: percentage

configure_interconnect

Should the Interconnect network be configured by Ansible

Default value

configure_interconnect: false

configure_limits

Configure /etc/security.d/limits.d/99-oracle-limits.conf?

Default value

configure_limits: true

configure_limits_pam

Configure /etc/pam.d/limits?

Default value

configure_limits_pam: true

configure_oracle_sudo

Add oracle to sudoers for root.

Default value

configure_oracle_sudo: false

configure_ssh

Should passwordless ssh be configured between clusternodes. Only applicable to RAC-installs

Default value

configure_ssh: false

disable_firewall

Should the Linux firewall be disabled? Only applicable to RHEL/OL at the moment.

Default value

disable_firewall: false

disable_numa_boot

Disable numa support during boot.

Default value

disable_numa_boot: true

disable_selinux

Default value

disable_selinux: true

etc_hosts_entries

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

Default value

etc_hosts_entries: []

Example usage

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

etc_hosts_ip

Set IP to 2nd Interface on virtualbox and 1st for all otehr installations

Default value

etc_hosts_ip: "{% if 'virtualbox' in ansible_virtualization_type %}{{ ansible_all_ipv4_addresses[1] }}{% else %}{{ ansible_default_ipv4.address }}{% endif %}"

extra_hugepages_per_instance

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

Default value

extra_hugepages_per_instance: 4

extrarepos_disabled

List of disabled yum repos during installation for RHEL/OL.

Default value

extrarepos_disabled: '[]'

extrarepos_enabled

Default value

extrarepos_enabled: "{%- if ansible_distribution == 'OracleLinux' -%}ol{{ ansible_distribution_major_version }}_addons{%- else -%}{%- endif %}"

firewall_open_listener_ports

Should the Listener ports be opened on the Linux firewall? Only applicable to RHEL/OL at the moment.

Default value

firewall_open_listener_ports: true

firewall_service

Used firewall service in OS. Value depends on used Distribution and version.

Default value

firewall_service: firewalld or iptables

grid_users

grid OS-User

Default value

grid_users:
  - username: grid
    uid: 54320
    primgroup: '{{ oracle_group }}'
    othergroups: '{{ asmadmin_group }},{{ asmdba_group }},{{ asmoper_group }},{{ dba_group }}'

host_fs_layout

Define physical Disk, Volume Group, logical Volume, Filesystem and swap Devices. See example configuration

Default value

host_fs_layout: '[]'

Example usage

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_os_packages

Install addional RPMs for Oracle?

Default value

install_os_packages: true

keyfile

Default value

keyfile: /tmp/known_hosts

max_size_in_gb_hugepages

Cap HugePages to 70% of physical memory to prevent overcomitting. Only valid when configure_hugepages_by: memory

Default value

max_size_in_gb_hugepages: '{{ ansible_memtotal_mb / 1024 * 0.7 }}'

nr_hugepages

This is an internal variable only. Do not define it!

Default value

nr_hugepages: _unset_

nr_hugepages_memory

This is an internal variable only. Do not define it!

Default value

nr_hugepages_memory: _unset_

nr_hugepages_percent

This is an internal variable only. Do not define it!

Default value

nr_hugepages_percent: _unset_

old_ssh_config

Default value

old_ssh_config: true

oracle_asm_packages

List of RPMs installed during ASM preparation for RHEL/OL.

There should be no reason to change this variable.

Default value

oracle_asm_packages:
  - '{{ asmlib_rpm }}'
  - '{{ asmlibsupport_rpm }}'
  - kmod-oracleasm

oracle_asm_packages_sles

List of RPMs installed during ASM preparation for SLES.

There should be no reason to change this variable.

Default value

oracle_asm_packages_sles:
  - oracleasm-kmp-default
  - oracleasm-kmp-xen
  - '{{ asmlib_rpm_sles }}'

oracle_extra_firewall_ports

Define additional ports to open on the OS firewall.

Default value

oracle_extra_firewall_ports: '[]'

Example usage

oracle_extra_firewall_ports:
  - 5500 # EM Express

oracle_groups

List of OS-groups for Oracle Dependent variables are defined in orahost_meta/defaults/main.yml

Default value

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}

oracle_hugepages

This is an internal variable. Do not change it!

Default value

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] }}"}

oracle_hugepages_sysctl_file

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.

Default value

oracle_hugepages_sysctl_file: _unset_

Example usage

oracle_hugepages_sysctl_file: '/etc/sysctl.d/oracle-hugepages.conf'

oracle_ic_net

Picks the last octet from the public ip to use for cluster-interconnect ip (e.g 3.3.3.51)

Default value

oracle_ic_net: 3.3.3.{{ ansible_all_ipv4_addresses[0].split(".")[-1] }}

oracle_packages

List of additinal RPMs for RHEL/OL.

install_os_packages: true is needed to install the RPMs.

Default value

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

oracle_packages_sles_multi

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.

Default value

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

oracle_sysctl

Configure parameter in sysctl.

Important

Do not add configurations for Hugepages here!

Default value

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}

oracle_sysctl_file

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)

Default value

oracle_sysctl_file: _unset_

Example usage

oracle_sysctl_file: '/etc/sysctl.d/oracle.conf'

oracle_users

oracle OS-User

Default value

oracle_users:
  - username: oracle
    uid: 54321
    primgroup: '{{ oracle_group }}'
    othergroups: '{{ dba_group }},{{ asmadmin_group }},{{ asmdba_group }},{{ asmoper_group }},backupdba,dgdba,kmdba,{{ oper_group }}'

os_family_supported

Support is limited to RHE/OL and SuSE

Default value

os_family_supported: "{% if ansible_os_family == 'Suse' %}Suse{% else %}RedHat{% endif %}"

os_min_supported_version

Minimum supported versions for SLES is 12.1 and RHEL/OL >= 6.4

Default value

os_min_supported_version: "{% if ansible_os_family == 'Suse' %}12.1{% else %}6.4{% endif %}"

percent_hugepages

Define percentage from RAM for Hugepages. Only valud when configure_hugepages_by: percentage

Default value

percent_hugepages: 50

size_in_gb_hugepages

Size in GB for Hugepages. Only valud when configure_hugepages_by: memory

Default value

size_in_gb_hugepages: 1

ssh_keys

Default value

ssh_keys:
  - /tmp/id_rsa
  - /tmp/id_rsa.pub
  - /tmp/authorized_keys

sudoers_template

Used ansible template for sudoers configuration.

Default value

sudoers_template: sudoers.j2

transparent_hugepage_disable

Disable Transparent Hugepages during boot.

Important

It is strongly recommended to disable Transparent Hugepages. Do not change this variable.

Default value

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}

transparent_hugepage_disable_by_grub

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

Default value

transparent_hugepage_disable_by_grub: false

Discovered Tags

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

Open Tasks

  • (improvement): SSH-Setup needs a rework…

Dependencies

  • global_handlers
  • orahost_meta

License

license (MIT)

Author

[Mikael Sandström]

16 - autoupgrade

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

autoupgrade_download_dir

Value for global.download_folder. Downloaded patches are placed here.

Default value

autoupgrade_download_dir: '{{ oracle_sw_source_local }}'

autoupgrade_download_filename_regex

Regex for filename in oracle_sw_patches. Only matching entries are downloaded by AutoUpgrade (database patches for autoupgrade_download_platform).

Default value

autoupgrade_download_filename_regex: ^p[0-9]+_[0-9A-Za-z]+_Linux-x86-64\.zip$

autoupgrade_download_gold_image

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.

Default value

autoupgrade_download_gold_image: ''

Example usage

autoupgrade_download_gold_image: "NO"

autoupgrade_download_gold_image_latest

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.

Default value

autoupgrade_download_gold_image_latest: false

autoupgrade_download_gold_image_prefix

Prefix for the new filename of a Gold Image (autoupgrade_download_gold_image_rename: true).

Default value

autoupgrade_download_gold_image_prefix: db_home_

autoupgrade_download_gold_image_rename

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.

Default value

autoupgrade_download_gold_image_rename: false

autoupgrade_download_latest

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.

Default value

autoupgrade_download_latest: false

autoupgrade_download_patches

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

Default value

autoupgrade_download_patches: []

Example usage

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"

autoupgrade_download_platform

Default platform for the download, when platform is not set in autoupgrade_download_patches.

Default value

autoupgrade_download_platform: LINUX.X64

autoupgrade_download_supported_releases

Releases supported by AutoUpgrade for downloading patches.

Default value

autoupgrade_download_supported_releases: [19, 21, 23, 26]

autoupgrade_download_use_oracle_sw_patches

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 release

The 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.

Default value

autoupgrade_download_use_oracle_sw_patches: true

autoupgrade_force_update

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.

Default value

autoupgrade_force_update: false

autoupgrade_home

Directory for autoupgrade.jar and the generated AutoUpgrade config files on the target host.

Default value

autoupgrade_home: '{{ oracle_base }}/product/autoupgrade'

autoupgrade_jar

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.

Default value

autoupgrade_jar: autoupgrade.jar

autoupgrade_jar_filesource

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.

Example usage

autoupgrade_jar_filesource: /orasw/autoupgrade/autoupgrade.jar

autoupgrade_jar_url

URL for the latest version of AutoUpgrade (used by autoupgrade_download_latest).

Default value

autoupgrade_jar_url: https://download.oracle.com/otn-pub/otn_software/autoupgrade.jar

autoupgrade_java_home

JAVA_HOME used for AutoUpgrade on the target host. java from PATH is used, when autoupgrade_java_home is empty.

Default value

autoupgrade_java_home: ''

Example usage

autoupgrade_java_home: /u01/app/oracle/product/19/db1/jdk

autoupgrade_java_options

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.

Default value

autoupgrade_java_options: []

Example usage

autoupgrade_java_options:
  - -Djavax.net.ssl.trustStore=/etc/pki/java/cacerts
  - -Djavax.net.ssl.trustStorePassword=changeit

autoupgrade_keystore

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).

Default value

autoupgrade_keystore: '{{ _autoupgrade_home }}/keystore'

autoupgrade_keystore_fail_on_invalid_credentials

Fail, when the credentials in the keystore cannot login into My Oracle Support.

Default value

autoupgrade_keystore_fail_on_invalid_credentials: true

autoupgrade_keystore_manage

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.

Default value

autoupgrade_keystore_manage: true

autoupgrade_keystore_no_log

Hide the output of tasks with passwords for the keystore console. Set to false for debugging only!

Default value

autoupgrade_keystore_no_log: true

autoupgrade_keystore_password

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.

Default value

autoupgrade_keystore_password: ''

autoupgrade_keystore_recreate

Remove and create the keystore in each execution.

Default value

autoupgrade_keystore_recreate: false

autoupgrade_keystore_timeout

Timeout in seconds for each prompt of the keystore console. The console connects to My Oracle Support for checking the credentials.

Default value

autoupgrade_keystore_timeout: 300

autoupgrade_local_home

Directory for autoupgrade.jar and the generated AutoUpgrade config files on the Ansible controller (autoupgrade_run_local: true).

Default value

autoupgrade_local_home: "{{ lookup('ansible.builtin.env', 'HOME') }}/autoupgrade"

autoupgrade_local_java_home

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.

Default value

autoupgrade_local_java_home: ''

autoupgrade_log_dir

Value for global.global_log_dir in the AutoUpgrade config files.

Default value

autoupgrade_log_dir: >-
  {{ _autoupgrade_run_local | bool
     | ternary(_autoupgrade_home + '/log', oracle_base + '/cfgtoollogs/autoupgrade') }}

autoupgrade_proxy_check

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.

Default value

autoupgrade_proxy_check: true

autoupgrade_proxy_check_timeout

Timeout in seconds for each URL of the check of the connection.

Default value

autoupgrade_proxy_check_timeout: 30

autoupgrade_proxy_check_urls

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.

Default value

autoupgrade_proxy_check_urls:
  - https://login-ext.identity.oraclecloud.com
  - https://transport.oracle.com
  - https://updates.oracle.com
  - https://aru-akam.oracle.com

autoupgrade_proxy_password

Password for an HTTP proxy with authentication. See autoupgrade_proxy_username.

Default value

autoupgrade_proxy_password: ''

autoupgrade_proxy_username

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.

Default value

autoupgrade_proxy_username: ''

Example usage

https_proxy: http://proxy.example.com:3128
no_proxy: localhost,.example.com
autoupgrade_proxy_username: proxyuser
autoupgrade_proxy_password: "{{ vault_proxy_password }}"

autoupgrade_run_local

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.

Default value

autoupgrade_run_local: true

autoupgrade_upgrade_clear_recovery_data

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!

Default value

autoupgrade_upgrade_clear_recovery_data: false

autoupgrade_upgrade_fail_on_precheck_errors

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.

Default value

autoupgrade_upgrade_fail_on_precheck_errors: true

autoupgrade_upgrade_global_parameters

Additional global parameters for the upgrade config files (global.<key>=<value>). global_log_dir is set by the role.

Default value

autoupgrade_upgrade_global_parameters: {}

Example usage

autoupgrade_upgrade_global_parameters:
  keystore: /u01/app/oracle/admin/autoupgrade/keystore

autoupgrade_upgrade_parameters

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.

Default value

autoupgrade_upgrade_parameters: {}

Example usage

autoupgrade_upgrade_parameters:
  timezone_upg: "yes"
  drop_grp_after_upgrade: "yes"

autoupgrade_upgrade_pdbs

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.

Default value

autoupgrade_upgrade_pdbs: []

Example usage

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"

autoupgrade_upgrade_poll

Poll interval in seconds for AutoUpgrade in deploy mode.

Default value

autoupgrade_upgrade_poll: 60

autoupgrade_upgrade_restoration

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.

Default value

autoupgrade_upgrade_restoration: false

autoupgrade_upgrade_timeout

Maximum runtime in seconds for AutoUpgrade in deploy mode per AutoUpgrade job (async).

Default value

autoupgrade_upgrade_timeout: 21600

Discovered Tags

always

assert

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

17 - global_handlers

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

restart_on_requirement

Controls if reboot handler actually reboots the host (true) or just displays a reboot advice (false)

Type: bool

Default value

restart_on_requirement: false

Dependencies

None.

License

license (MIT)

Author

[Thilo Solbrig]

18 - oraapex

The role is in pre ALPHA state.

A lot of changes are planned during development at the moment.

Limitations:

  • Oracle RDBMS 19c+ - older versions may work but not tested anymore.
  • Installation in PDB only - no CDB or nonCDB installation at the moment
  • RAC not tested yet.

Documentation: https://github.com/oravirt/ansible-oracle/blob/master/doc/guides/apex_ords.adoc

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oraapex_base

oraapex_base is used as a prefix directory for unzip for apex.zip.

Default value

oraapex_base: >-
  {{ oracle_base }}/product

oraapex_default_admin_password

Password for apex_admin_user from oracle_databases or oracle_pdbs.

oraapex_default_files_tablespace

Default value

oraapex_default_files_tablespace: SYSAUX

oraapex_default_tablespace

Default value

oraapex_default_tablespace: SYSAUX

oraapex_default_temp_tablespace

Default value

oraapex_default_temp_tablespace: TEMP

oraapex_image_path

Default value

oraapex_image_path: /i/

oraapex_rac_primary_node_only

Default value

oraapex_rac_primary_node_only: true

oraapex_rac_primary_only

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!

Open Tasks

  • (information): oraapex_rac_primary_only not implemented yet.

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

  • Thorsten Bruhns

19 - oraasm_manage_diskgroups

Manages ASM diskgroups.

Important

All variables in this role are internal use only. Do not set them in inventory!

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

diskgroup

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

20 - oracluvfy

Manage Cluster Verification Utility from Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oracluvfy_archive

ZIP Archive used by the role.

Default value

oracluvfy_archive: cvupack_linux_ol7_x86_64.zip

oracluvfy_archive_filesource

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

Example usage

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

oracluvfy_force_update

Force unarchive of cluvfy in oracluvfy_home.

Default value

oracluvfy_force_update: false

oracluvfy_home

Default value

oracluvfy_home: '{{ oracle_base }}/product/cluvfy'

Discovered Tags

always

assert

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

21 - oradb_datapatch

Manage datapatch for Oracle Database

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oradb_datapatch_fail_on_db_not_exist

Should 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!

Default value

oradb_datapatch_fail_on_db_not_exist: '{{ fail_on_db_not_exist | default(false) }}'

Discovered Tags

datapatch

startdb

Open Tasks

  • (bug): Do we really need db-connection here?

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

22 - oradb_facts

Gather Ansible Facts from database

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oradb_facts_db_user

The dbuser for connection to database.

Default value

oradb_facts_db_user: sys

Discovered Tags

db_facts

Open Tasks

  • (bug): parameter user, password and sysdba needs a refactoring

Dependencies

  • orasw_meta

License

license (MIT)

Author

Thorsten Bruhns

23 - oradb_manage_grants

Manage grants for users in Oracle Databases

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

grants

grants2

grants4

users

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

[Mikael Sandström]

24 - oradb_manage_parameters

Manage Oracle Database Parameters

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

restart_spparameter_changed

Bounce 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.

Default value

restart_spparameter_changed: false

Discovered Tags

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.

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

[Mikael Sandström]

25 - oradb_manage_pdb

Manage pluggable databases in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

pdbadmin_password

Password for pdb_admin user.

Default value

pdbadmin_password: >-
  {{ dbpasswords[odb.1.cdb][odb.1.pdb_name][pdbadmin_user] | default(default_dbpass) }}

pdbadmin_user

Default pdb_admin user for newly created PDBs.

Could be set in oracle_pdbs to define different pdb_admin user for each PDB.

Default value

pdbadmin_user: >-
  {{ odb[1].pdbadmin_user | default('PDBADMIN') }}

Discovered Tags

pdb

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

26 - oradb_manage_profiles

Manage database profiles in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

dbprofiles

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

  • Mikael Sandström
  • Thorsten Bruhns

27 - oradb_manage_roles

Manage roles in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

grants

users

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

[Mikael Sandström]

28 - oradb_manage_services

Manage services in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

create_service

services

start_service

Open Tasks

  • (bug): Module oracle_services does not support ‘as sysdba’. Connect User system is hard coded for the moment…
  • (bug): Role require Oracle Restart/GI at the moment

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

29 - oradb_manage_statspack

Manage Statspack in Oracle.

Not RAC aware at the moment.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

purgedays

Global default variable for Statspack purgetime in days. Could be defined for each database with oracle_databases. An example is shown there.

Default value

purgedays: 35

purgeinterval

Global default variable for Statspack purge interval in scheduler job. Could be defined for each database with oracle_databases. An example is shown there.

Default value

purgeinterval: FREQ=daily;byhour=3;byminute=15;bysecond=0

snapinterval

Global default variable for Statspack snap interval in scheduler job. Could be defined for each database with oracle_databases. An example is shown there.

Default value

snapinterval: FREQ=hourly;byminute=0;bysecond=0

snaplevel

Global default variable for Statspack snaplevel. Could be defined for each database with oracle_databases. An example is shown there.

Default value

snaplevel: 7

Discovered Tags

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

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

[Thorsten Bruhns]

30 - oradb_manage_tablespace

Manage Tablespaces in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

tablespace

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

  • Mikael Sandström
  • Thorsten Bruhns

31 - oradb_manage_users

Manage Users in Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Discovered Tags

users

Dependencies

  • orasw_meta
  • oradb_facts

License

license (MIT)

Author

[Mikael Sandström]

32 - oradb_manage_wallet

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oracle_wallet_config

Default value

oracle_wallet_config: []

Example usage

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

Default value

oracle_wallet_password: {}

Example usage

oracle_wallet_password:
  wallet1: <password>
  wallet2: <password>

oracle_wallet_show_password

Show password during execution in loop label.

Default value

oracle_wallet_show_password: false

Discovered Tags

always

cert

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

33 - oradb_tzupgrade

Manage timezone upgrades for an Oracle Database

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Dependencies

  • orahost_meta
  • orasw_meta_internal

License

license (MIT)

Author

[Alexandru Tică]

34 - orahost_cron

Configure cronjobs for ansible-oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

cron_config

Define custom cronjobs for ansible-oracle. No job is existing by default.

Example usage

cron_config:
  - { user: oracle, name: "clean-up job", job: "some fancy thing", hour: "1", cron_file: oracle-cleanup, state: present }

Discovered Tags

cron

Dependencies

None.

License

license (MIT)

Author

[Mikael Sandström]

35 - orahost_logrotate

Configure logrotate for ansible-oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

logrotate_config

Configuration of logrotate definitions.

Default value

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

oracle_cleanup_days

Define number of days for oracle_cleanup.sh logfiles and audit files.

Default value

oracle_cleanup_days: 14

oracle_home_gi

Default value

oracle_home_gi: '{% if _oraswgi_meta_configure_cluster %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}'

oracle_home_gi_cl

Default value

oracle_home_gi_cl: /u01/app/{{ oracle_install_version_gi }}/grid

oracle_home_gi_so

Default value

oracle_home_gi_so: '{{ oracle_base }}/{{ oracle_install_version_gi }}/grid'

oracle_trace_cleanup_days

Define number of days for ADR in Oracle.

Default value

oracle_trace_cleanup_days: 7

orahost_logrotate_setup_logrotate

Setup of logrotate/cleanup is optional

Default value

orahost_logrotate_setup_logrotate: true

Open Tasks

  • (bug): oracle_home_gi variables require a central meta role

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

36 - orahost_ssh

SSH Setup for Oracle Grid-Infrastructure installations.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

orahost_ssh_keyname

The name of used key during role execution.

Example for oracle:

/home/oracle/.ssh/{{ orahost_ssh_keyname }}

Default value

orahost_ssh_keyname: id_{{ orahost_ssh_key_type }}

Dependencies

  • orahost_meta
  • orasw_meta_internal

License

license (MIT)

Author

[Thorsten Bruhns]

37 - orahost_storage

Role to configure the storage for oracle.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

asmlib_binary

Default value

asmlib_binary: /usr/sbin/oracleasm

multipath

Configure multipath

Default value

multipath: none

Example usage

multipath: dm-multipath

oradnfs

Defines the settings for dnfstab in Oracle.

Default value

oradnfs: _unset_

Example usage

oradnfs:
 - server: nfsserver
   ips:
     - local: dbserver
       path: nfsserver
   exports:
     - export: /nfs/oradata
       mount: /u02/oradata2
     - export: /nfs/oradata2
       mount: /u02/oradata

partition_devices

Create a partition on storage disk?

Default value

partition_devices: true

partition_suffix

Value of partition_suffix depends on vairable multipath. No need to set this variable.

Default value

partition_suffix: '1'

use_partition_devices

Deprecated variable. Use partition_devices as replacement.

Default value

use_partition_devices: true

Discovered Tags

asmlibconfig

asmstorage

kpartx

partition

udev

Open Tasks

  • (bug): why is variable multipath only used for dm-multipath?

Dependencies

  • orahost_meta

License

license (MIT)

Author

[Mikael Sandström]

38 - oraords

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.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

oraords_apex_image_context

APEX context path for Images.

oraords_apex_image_path

Directory for APEX Images on ORDS Host.

oraords_db_pools

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)>

Default value

oraords_db_pools:
  - db_pool: default
    admin_user: sys
    service: orclpdb
    port: 1521

oraords_default_admin_user

Default value

oraords_default_admin_user: sys

oraords_default_port

Default value

oraords_default_port: 1521

oraords_java_rpm

Default value

oraords_java_rpm: java-21-openjdk

oraords_oracle_home

ORACLE_HOME for ORDS.

Default value

oraords_oracle_home: >-
  {{ oracle_base }}/product/ords

oraords_ords_bin

PATH for ords binary

Default value

oraords_ords_bin: >-
  /opt/oracle/ords/bin

oraords_ords_config

ORDS configuration directory.

Default value

oraords_ords_config: >-
  /etc/ords/config

oraords_ords_logs

ORDS logging directory.

Default value

oraords_ords_logs: >-
  /etc/ords/logs

Discovered Tags

always

ords_config

Dependencies

  • orahost_meta
  • orasw_meta

License

license (MIT)

Author

Thorsten Bruhns

39 - orasw_download_patches

Download all patches from Oracle

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

mos_login

Login name for My Oracle Support (required)

mos_password

Password for My Oracle Support (required)

opatchinfo

This is an internal variable for downloading patches. Usually no need to change it.

Default value

opatchinfo: []

oracle_patch_download_dir

Target directory for patch downloads

Default value

oracle_patch_download_dir: '{{ oracle_sw_source_local }}'

oracle_patch_download_host

delegate_to host for downloads

Default value

oracle_patch_download_host: localhost

oracle_plat_lang

This is an internal variable for downloading patches. Usually no need to change it.

Default value

oracle_plat_lang: 226P

Dependencies

  • orasw_meta

License

license (MIT)

Author

bartowl github@bartowl.eu

40 - oraswdb_golden_image

Create Golden-Images from Oracle Database Homes and Oracle Grid-Infrastructure/Restart

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

golden_image_dest

Set destination directory for Golden-Image extraction.

Variable has no default value.

oraswdb_golden_image_create

Crfeate Golden-Image for Database Home.

Default value

oraswdb_golden_image_create: false

Discovered Tags

always

golden_image_db

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

41 - oraswdb_manage_patches

Manage Patch Installation in Database ORACLE_HOMEs.

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

opatch_db_conflict_check

When calling oracle_opatch for DB, decide if analyze stage of opatch/opatchauto should be executed.

Type: boolean

Default value

opatch_db_conflict_check: '{{ opatch_conflict_check | bool }}'

oraswdb_manage_patches_cleanup_staging

Remove following list of directories after DB-Patching when oracle_sw_copy: true:

  • “{{ oracle_stage }}/patches”

Default value

oraswdb_manage_patches_cleanup_staging: true

oraswdb_manage_patches_force_opatch_upgrade

Upgrade OPatch without checking for existing version.

Needed for prepatch installations, because Home is not registered in central inventory.

Default value

oraswdb_manage_patches_force_opatch_upgrade: false

Discovered Tags

always

apply_patch_db

autopatch

directories

molecule-idempotence-notest

nfsmountdb

nfsumountdb

ocmconfig

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Mikael Sandström]

42 - oraswgi_golden_image

Create Golden-Images from Oracle Grid-Infrastructure/Restart

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

golden_image_dest

Set destination directory for Golden-Image extraction.

Variable has no default value.

oraswgi_golden_image_create

Crfeate Golden-Image for Grid-Infrastructure/Restart.

Default value

oraswgi_golden_image_create: false

oraswgi_golden_image_filename

Filename of created Image archive.

Default value

oraswgi_golden_image_filename: >-
  {% if oracle_install_option_gi == 'CRS_CONFIG' -%}
  gi_{% else %}restart_{% endif %}{{ oracle_install_version_gi | split('.') | first }}.zip

Discovered Tags

always

golden_image_gi

Dependencies

  • orasw_meta

License

license (MIT)

Author

[Thorsten Bruhns]

43 - oraswgi_manage_patches

Install/Remove Patches from Oracle Database Homes

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

opatch_gi_conflict_check

When calling oracle_opatch for GI, decide if analyze stage of opatch/opatchauto should be executed.

Type: boolean

Default value

opatch_gi_conflict_check: '{{ opatch_conflict_check | bool }}'

Discovered Tags

always

assert

current_opatch_version

Dependencies

  • orahost_meta
  • orasw_meta
  • oraswgi_meta

License

license (MIT)

Author

  • Mikael Sandström
  • Thorsten Bruhns

44 - oraswgi_meta

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

Table of contents


Requirements

  • Minimum Ansible version: 2.16.0

Default Variables

_grid_install_user

This is an internal variable of ansible-oracle.

Do not change it!

Default value

_grid_install_user: '{% if role_separation %}{{ grid_user }}{% else %}{{ oracle_user }}{% endif %}'

_oraswgi_meta_configure_cluster

This is an internal variable of ansible-oracle.

Do not change it!

Default value

_oraswgi_meta_configure_cluster: "{{ oracle_install_option_gi == 'CRS_CONFIG' }}"

apply_patches_gi

Apply patches to Grid-Infrastructure/Restart?

Do not disable this!

Default value

apply_patches_gi: true

asmmonitorpassword

ASMSNMP Password for ASM.

Default value

asmmonitorpassword: '{{ default_gipass }}'

gi_patches

Dictionary of lists for opatch and opatchauto patches for Grid-Infrastructure/Restart.

Default value

gi_patches: {}

Example usage

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_before_rootsh

Patch Grid-Infrastructure during gridSetup.sh

Default value

patch_before_rootsh: true

sysasmpassword

SYSASM Password for ASM.

Default value

sysasmpassword: '{{ default_gipass }}'

Discovered Tags

always

assert_ansible_oracle

Dependencies

None.

License

license (MIT)

Author

[Thorsten Bruhns]