Skip to content

Commit abbb72f

Browse files
committed
minor fixes for role separation in Oracle Restart
1 parent fc8682b commit abbb72f

File tree

9 files changed

+30
-13
lines changed

9 files changed

+30
-13
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
minor_changes:
3+
- "minor fixes for role separation in Oracle Restart (oravirt#409)"

roles/oraswgi_install/tasks/19.3.0.0.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
- patch_before_rootsh
3737
- oracle_home_gi not in checkgiinstall.stdout
3838
- oracle_install_version_gi is version(19, '>=')
39-
vars:
40-
oracle_user: "{{ grid_user }}"
4139

4240
- name: install_home_gi | Check for file GridSetup.sh
4341
no_log: true

roles/oraswgi_install/tasks/assert.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Oraswdb_install | Assert variables
2+
- name: Oraswgi_install | Assert variables
33
ansible.builtin.assert:
44
quiet: true
55
that:
@@ -9,15 +9,28 @@
99
tags: always
1010

1111
# RAC is not supported at the moment!
12-
- name: Oraswdb_install | Assert oracle_install_option_gi
12+
- name: Oraswgi_install | Assert oracle_install_option_gi
1313
ansible.builtin.assert:
1414
quiet: true
1515
that:
1616
- oracle_install_option_gi in ('HA_CONFIG')
1717
# - oracle_install_option_gi in ('HA_CONFIG', 'CRS_CONFIG')
1818
tags: always
1919

20-
- name: Oraswdb_install | Assert Grid-Infrastructure variables
20+
- name: Oraswgi_install | Assert role_separation
21+
ansible.builtin.assert:
22+
quiet: true
23+
that:
24+
- (role_separation and grid_user != oracle_user)
25+
or
26+
not role_separation
27+
fail_msg: >-
28+
Role separation is enabled.
29+
Different values for grid_user={{ grid_user }}
30+
and oracle_user={{ oracle_user }} needed.
31+
tags: always
32+
33+
- name: Oraswgi_install | Assert Grid-Infrastructure variables
2134
ansible.builtin.assert:
2235
quiet: true
2336
that:

roles/oraswgi_manage_patches/tasks/loop_remove_single_opatch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: loop_remove_single_opatch | Get unique_patch_id from installed patch
33
ansible.builtin.command: "{{ oracle_home_gi }}/OPatch/opatch lspatches -oh {{ oracle_home_gi }} -id {{ gip_opatch.patchid }}"
44
become: true
5-
become_user: "{{ oracle_user }}"
5+
become_user: "{{ _grid_install_user }}"
66
changed_when: false
77
register: gihome_oneoff_res
88

@@ -33,4 +33,4 @@
3333
output: verbose
3434
state: "{{ gip_opatch.state }}"
3535
become: true
36-
become_user: "{{ oracle_user }}"
36+
become_user: "{{ _grid_install_user }}"

roles/oraswgi_manage_patches/tasks/loop_stage_patch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
2020
- name: Loop_stage_patch | Become User to oracle
2121
become: true
22-
become_user: "{{ oracle_user }}"
22+
become_user: "{{ _grid_install_user }}"
2323
block:
2424
- name: Loop_stage_patch | Copy oracle DB patch (opatch) to server
2525
when:

roles/oraswgi_manage_patches/tasks/post_install_patch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- name: post_install_patch | Get list of current installed patches
33
ansible.builtin.command: "{{ oracle_home_gi }}/OPatch/opatch lspatches -oh {{ oracle_home_gi }}"
44
become: true
5-
become_user: "{{ grid_user }}"
5+
become_user: "{{ _grid_install_user }}"
66
changed_when: false
77
register: gihome_patches
88

@@ -116,7 +116,7 @@
116116
- name: post_install_patch | Get new list of current installed patches
117117
ansible.builtin.command: "{{ oracle_home_gi }}/OPatch/opatch lspatches -oh {{ oracle_home_gi }}"
118118
become: true
119-
become_user: "{{ oracle_user }}"
119+
become_user: "{{ _grid_install_user }}"
120120
changed_when: false
121121
register: dbhome_patches
122122
when:

roles/oraswgi_manage_patches/tasks/roothas_postpatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ansible.builtin.stat:
44
path: "{{ oracle_home_gi }}/bin"
55
become: true
6-
become_user: "{{ grid_user }}"
6+
become_user: "{{ _grid_install_user }}"
77
register: oraclehomegi_stat
88

99
- name: roothas_postpatch | Execute roothas.sh -postpatch

roles/oraswgi_manage_patches/tasks/roothas_prepatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ansible.builtin.stat:
44
path: "{{ oracle_home_gi }}/bin"
55
become: true
6-
become_user: "{{ grid_user }}"
6+
become_user: "{{ _grid_install_user }}"
77
register: oraclehomegi_stat
88

99
- name: roothas_prepatch | Execute roothas.sh -prepatch

roles/oraswgi_meta/tasks/assert.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626

2727
- name: Type of Installation
2828
ansible.builtin.debug:
29-
msg: "oracle_install_option_gi: {{ oracle_install_option_gi }}"
29+
msg:
30+
- "oracle_install_option_gi: {{ oracle_install_option_gi }}"
31+
- "role_separation: {{ role_separation }}"
32+
- "_grid_install_user: {{ _grid_install_user }} (internal variable. Use grid_user + role_separation in inventory.)"
3033

3134
- name: Assert Variables for Restart/Grid Infrastructure Setup
3235
ansible.builtin.assert:

0 commit comments

Comments
 (0)