Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dba 528 set parameters #362

Merged
merged 6 commits into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@
block:
# The RMAN Retention Policy is only defined on the primary database so
# check which group that is
- name: Get Primary Database Group

- name: Change target host group name if not ending with delius_primarydb
set_fact:
primarydb_group: "{{ target_host.split('_')[0] + '_primarydb' }}"
primarydb_group: "{{ target_host | replace (target_host.split('_')[-2] + '_' + target_host.split('_')[-1], 'delius_primarydb') }}"

- name: Get Specified RMAN Recovery Window
set_fact:
Expand Down Expand Up @@ -118,7 +119,7 @@
# When setting the parameters, numeric values and booleans need to be unquoted and everything else should be single quoted
# Note that we require some special handling for boolean case sensitivity as Ansible will convert true or false strings to booleans
- name: Set Parameter
script: set_parameter_values.sh {{ database_sid }} "{{ item }}" "{{ database_parameters[item] | regex_replace('^(\d+|(?i)true|(?i)false)$','{NOBEGINQUOTE}\1{NOENDQUOTE}') | regex_replace('^(.*)$',"'\1'") | regex_replace("'{NOBEGINQUOTE}|{NOENDQUOTE}'") }}"
script: set_parameter_values.sh {{ database_sid }} "{{ item }}" "{{ database_parameters[item] | regex_replace('(?i)^(\d+|true|false)$','{NOBEGINQUOTE}\1{NOENDQUOTE}') | regex_replace('^(.*)$',"'\1'") | regex_replace("'{NOBEGINQUOTE}|{NOENDQUOTE}'") }}"
register: setout
with_items: "{{ database_parameters }}"
when:
Expand All @@ -127,7 +128,7 @@
- database_parameters_spfile[item] == 'NORESTART'

- name: Set Parameter In Spfile
script: set_parameter_values_spfile.sh {{ database_sid }} "{{ item }}" "{{ database_parameters[item] | regex_replace('^(\d+|(?i)true|(?i)false)$','{NOBEGINQUOTE}\1{NOENDQUOTE}') | regex_replace('^(.*)$',"'\1'") | regex_replace("'{NOBEGINQUOTE}|{NOENDQUOTE}'") }}"
script: set_parameter_values_spfile.sh {{ database_sid }} "{{ item }}" "{{ database_parameters[item] | regex_replace('(?i)^(\d+|true|false)$','{NOBEGINQUOTE}\1{NOENDQUOTE}') | regex_replace('^(.*)$',"'\1'") | regex_replace("'{NOBEGINQUOTE}|{NOENDQUOTE}'") }}"
register: setout_spfile
with_items: "{{ database_parameters }}"
when:
Expand Down Expand Up @@ -355,18 +356,18 @@

# Additional Non-SPFILE Parameters: SQL*Net network configuration parameters set-up
- name: Set SQL*Net Network Parameters If Required
include: sqlnet_parameters.yml
include_tasks: sqlnet_parameters.yml
when: sqlnet_parameters is defined

# Additional Non-SPFILE Parameters: Data Guard configuration parameters set-up
- name: Set Data Guard Parameters If Required
include: data_guard_parameters.yml
include_tasks: data_guard_parameters.yml
when: data_guard_parameters is defined

# Additional Non-SPFILE Parameters: AWR configuration parameters set-up
# We only need to run this on the Primary Database and Only if Management Packs are enabled
- name: Set AWR Configuration if Required
include: awr_parameters.yml
include_tasks: awr_parameters.yml
when:
- database_parameters.control_management_pack_access in ['DIAGNOSTICS','DIAGNOSTIC+TUNING']
- database_primary_sid is defined
Expand Down