Skip to content

Commit

Permalink
Merge pull request #362 from ministryofjustice/DBA-528-SET-PARAMETERS
Browse files Browse the repository at this point in the history
Dba 528 set parameters
  • Loading branch information
ranbeersingh1 authored Oct 11, 2023
2 parents 4adb8df + af72dcc commit 227ce01
Showing 1 changed file with 8 additions and 7 deletions.
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

0 comments on commit 227ce01

Please sign in to comment.