orahost_meta
Meta role used by other roles to share variable defaults.
Table of contents
- Requirements
- Default Variables
- asm_diskgroups
- asmadmin_group
- asmdba_group
- asmoper_group
- configure_host_disks
- dba_group
- device_persistence
- grid_user
- grid_user_home
- oper_group
- oracle_group
- oracle_inventory_loc
- oracle_nr_bg_processes
- oracle_rsp_stage
- oracle_script_env
- oracle_seclimits
- oracle_stage
- oracle_tmp_stage
- oracle_user
- oracle_user_home
- orahost_meta_cv_assume_distid
- orahost_meta_java_env
- orahost_meta_java_options
- orahost_meta_tmp_stage_os_managed
- orahost_meta_tmpdir
- orahost_min_swap_mb
- orahost_ssh_hostkeytypes
- orahost_ssh_key_size
- orahost_ssh_key_type
- orasw_meta_primary_node
- role_separation
- scripts_folder
- sysctl_kernel_sem_force
- Discovered Tags
- Dependencies
- License
- Author
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:truefor 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]