|
68 | 68 | - ( get_fast_start_failover.stdout | trim ) not in ['','Disabled']
|
69 | 69 |
|
70 | 70 | # Allow OEM jobs to run during the flashback so we can pick up Audited Interaction Data for archival if required
|
71 |
| -# - name: Start Blackout for Flashback |
72 |
| -# import_playbook: ../oem-blackout/playbook.yml |
73 |
| -# when: required_action == "Flashback to Restore Point" |
74 |
| -# vars: |
75 |
| -# target: "{{ target_dbs }}" |
76 |
| -# blackout: "Flashback_to_{{ restore_point_name }}" |
77 |
| -# object_type: all |
78 |
| -# action: start |
79 |
| -# allow_jobs: true |
| 71 | +- name: Start Blackout for Flashback |
| 72 | + import_playbook: ../oem_blackout/playbook.yml |
| 73 | + when: required_action == "Flashback to Restore Point" |
| 74 | + vars: |
| 75 | + target: "{{ target_dbs }}" |
| 76 | + blackout: "Flashback_to_{{ restore_point_name }}" |
| 77 | + object_type: all |
| 78 | + action: start |
| 79 | + allow_jobs: true |
80 | 80 |
|
81 | 81 | # Ensure all connections to Delius Primary are blocked and removed
|
82 | 82 | # prior to a Flashback
|
83 | 83 | - name: Block connections to Delius primary database
|
84 | 84 | import_playbook: ../block_sessions/playbook.yml
|
85 | 85 | vars:
|
86 |
| - target_host: "{{ target_dbs.split(',') | select('search', '.*delius_primarydb') | first }}" |
| 86 | + target_host: "{{ target_dbs.split(',') | select('match','.*delius_dbs') | first | replace('dbs','primarydb') }}" |
87 | 87 | database: { "delius": { "high_availability_count": 0 } }
|
88 | 88 | action: block
|
89 | 89 | when:
|
|
198 | 198 |
|
199 | 199 | when: (restore_date_time | default() | length > 0) and database_primary_sid is defined
|
200 | 200 |
|
201 |
| - - name: Get environment name and application name |
202 |
| - set_fact: |
203 |
| - environment_name: "{{ hostvars[inventory_hostname].group_names[2] | replace(hostvars[inventory_hostname].group_names[2].split('_')[-1],'') }}" |
204 |
| - application_name: "{{ hostvars[inventory_hostname].group_names[3].split('_')[-2] }}" |
205 |
| - |
206 | 201 | - name: Create Oracle Standby Restore Points
|
207 | 202 | script: create_standby_restore_points.sh
|
208 | 203 | when: database_standby_sid is defined
|
209 | 204 | environment:
|
210 | 205 | RESTORE_POINT_NAME: "{{ uplift_restore_point_name | default(restore_point_name) | upper }}"
|
211 |
| - SCN: "{{ hostvars[groups[environment_name + application_name + '_primarydb'][0]]['scn'] | default('0') }}" |
| 206 | + SCN: "{{ hostvars[groups[hostvars[inventory_hostname].group_names | select('match','.*_dbs') | first | replace('dbs','primarydb')][0]]['scn'] | default('0') }}" |
212 | 207 |
|
213 | 208 | - name: Create Oracle Primary Restore Points
|
214 | 209 | script: create_primary_restore_points.sh
|
|
306 | 301 | - name: Unblock connections to Delius primary database
|
307 | 302 | import_playbook: ../block_sessions/playbook.yml
|
308 | 303 | vars:
|
309 |
| - target_host: "{{ target_dbs.split(',') | select('search', '.*delius_primarydb') | first }}" |
| 304 | + target_host: "{{ target_dbs.split(',') | select('match','.*delius_dbs') | first | replace('dbs','primarydb') }}" |
310 | 305 | database: { "delius": { "high_availability_count": 0 } }
|
311 | 306 | action: unblock
|
312 | 307 | ignore_flashback: true
|
|
389 | 384 | # out of Sync with those in SSM Parameter store and OEM. Rotate the passwords again to sync everything up.
|
390 | 385 | # (This step is skipped if not in AWS since there will be no password store)
|
391 | 386 | - name: Rotate Database Passwords
|
392 |
| - import_playbook: ../oracle_password_rotation/password_rotation.yml |
| 387 | + import_playbook: ../oracle_password_rotation/database_password_rotation.yml |
393 | 388 | vars:
|
394 | 389 | rotate_database_passwords: true
|
395 | 390 | rotate_groups: "{{ target_dbs }}"
|
|
445 | 440 | - database_primary_sid is defined
|
446 | 441 | - database_primary_sid | regex_search('STGMIS')
|
447 | 442 |
|
448 |
| -# - name: Stop Blackout for Flashback |
449 |
| -# import_playbook: ../oem-blackout/playbook.yml |
450 |
| -# when: required_action == "Flashback to Restore Point" |
451 |
| -# vars: |
452 |
| -# target: "{{ target_dbs }}" |
453 |
| -# blackout: "Flashback_to_{{ restore_point_name }}" |
454 |
| -# object_type: all |
455 |
| -# action: stop |
| 443 | +- name: Stop Blackout for Flashback |
| 444 | + import_playbook: ../oem_blackout/playbook.yml |
| 445 | + when: required_action == "Flashback to Restore Point" |
| 446 | + vars: |
| 447 | + target: "{{ target_dbs }}" |
| 448 | + blackout: "Flashback_to_{{ restore_point_name }}" |
| 449 | + object_type: all |
| 450 | + action: stop |
456 | 451 |
|
457 | 452 | # Always Run the Restore Point Report at the End
|
458 | 453 | - name: Report restore points
|
|
0 commit comments