Skip to content

Commit b88fc4e

Browse files
authored
Merge pull request #269 from Rendanic/prnfs
Changes for NFS installation media
2 parents 3fe2d85 + 3d8bcc9 commit b88fc4e

File tree

8 files changed

+63
-47
lines changed

8 files changed

+63
-47
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
bugfixes:
3+
- "orasw_meta: added tasks/mount_stage_remote.yml (#269)"
4+
- "orasw_meta: added tasks/umount_stage_remote.yml (#269)"

inventory/dbfs/group_vars/all/software_src.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,9 @@ oracle_sw_unpack: false
55

66
# Directory for Installation-Media
77
oracle_stage_remote: /tmp
8+
9+
# Example for Remote NFS
10+
# install_from_nfs: true # Mount NFS-Share?
11+
# nfs_server_sw: 192.168.56.99 # NFS-Server
12+
# nfs_server_sw_path: /sw # NFS-Share
13+
# oracle_stage_remote: /u01/se # local mount point for NFS share

roles/orasw_meta/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
install_from_nfs: false
3+
24
oracle_user: oracle # User that will own the Oracle Installations.
35
grid_user: grid
46
grid_install_user: "{% if role_separation %}{{ grid_user }}{% else %}{{ oracle_user }}{% endif %}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
# Do not mount installation media during boot!
3+
- name: orasw_meta | Mount nfs share with installation media
4+
ansible.builtin.mount:
5+
src: "{{ nfs_server_sw }}:{{ nfs_server_sw_path }}"
6+
name: "{{ oracle_stage_remote }}"
7+
fstype: nfs
8+
state: mounted
9+
when: install_from_nfs
10+
tags:
11+
- nfsmountdb
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
# Try to umount and ignore_errors
3+
- name: orasw_meta | Umount nfs share with installation media
4+
ansible.builtin.mount:
5+
src: "{{ nfs_server_sw }}:{{ nfs_server_sw_path }}"
6+
name: "{{ oracle_stage_remote }}"
7+
fstype: nfs
8+
state: absent
9+
# noqa ignore-errors
10+
ignore_errors: true
11+
when: install_from_nfs
12+
tags:
13+
- nfsumountdb

roles/oraswdb_install/tasks/main.yml

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
- assert
2020

2121
- name: install_home_db | Mount nfs share with installation media
22-
ansible.builtin.mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=mounted
23-
when: install_from_nfs
22+
ansible.builtin.include_role:
23+
name: orasw_meta
24+
tasks_from: mount_stage_remote
2425
tags:
2526
- nfsmountdb
2627

@@ -70,39 +71,6 @@
7071
tags:
7172
- oradbsw
7273

73-
#
74-
# - name: install_home_db | Extract files to stage-area
75-
# unarchive:
76-
# src={{ oracle_stage }}/{{ item[0].filename }}
77-
# dest={{ oracle_stage }}/{{ item[0].version }}
78-
# copy=no
79-
# creates="{{ oracle_stage }}/{{ item[0].version }}/{{ item[0].creates }}"
80-
# with_nested:
81-
# - "{{ oracle_sw_image_db }}"
82-
# - "{{ db_homes_installed }}"
83-
# become: true
84-
# become_user: "{{ oracle_user }}"
85-
# run_once: "{{ configure_cluster }}"
86-
# when: item[0].version == db_homes_config[item[1].home]['version'] and item[1].state|lower == 'present' and oracle_sw_copy and oracle_sw_unpack
87-
# tags:
88-
# - oradbswunpack
89-
#
90-
# - name: install_home_db | Extract files to stage-area (from remote location)
91-
# unarchive:
92-
# src={{ oracle_stage_remote }}/{{ item[0].filename }}
93-
# dest={{ oracle_stage }}/{{ item[0].version }}
94-
# copy=no
95-
# creates="{{ oracle_stage }}/{{ item[0].version }}/{{ item[0].creates }}"
96-
# with_nested:
97-
# - "{{ oracle_sw_image_db }}"
98-
# - "{{ db_homes_installed }}"
99-
# become: true
100-
# become_user: "{{ oracle_user }}"
101-
# run_once: "{{ configure_cluster }}"
102-
# when: item[0].version == db_homes_config[item[1].home]['version'] and item[1].state|lower == 'present' and not oracle_sw_copy and oracle_sw_unpack
103-
# tags:
104-
# - oradbswunpack
105-
10674
- ansible.builtin.include_tasks: install-home-db.yml
10775
with_items:
10876
- "{{ db_homes_installed }}"
@@ -112,10 +80,11 @@
11280
tags: oradbinstall,dbchopt
11381

11482
- name: install_home_db | Unmount nfs share with installation media
115-
ansible.builtin.mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=absent
116-
when: install_from_nfs
83+
ansible.builtin.include_role:
84+
name: orasw_meta
85+
tasks_from: umount_stage_remote
11786
tags:
118-
- nfsunmountdb
87+
- nfsumountdb
11988

12089
- name: install_home_db | copy start/stop script for autostart
12190
ansible.builtin.copy:

roles/oraswdb_manage_patches/tasks/main.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
ansible.builtin.stat: path=/etc/oracle/olr.loc
44
register: olrloc
55

6-
- name: install_home_db | Mount nfs share with installation media
7-
ansible.builtin.mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=mounted
8-
when: install_from_nfs
6+
- name: db_opatch | Mount nfs share with installation media
7+
ansible.builtin.include_role:
8+
name: orasw_meta
9+
tasks_from: mount_stage_remote
910
tags:
1011
- nfsmountdb
1112

@@ -29,3 +30,10 @@
2930
loop_var: dbh
3031
when: db_homes_installed is defined and dbh.state == 'present' and dbh.apply_patches |default (False) and apply_patches_db
3132
tags: autopatch
33+
34+
- name: db_opatch | Unmount nfs share with installation media
35+
ansible.builtin.include_role:
36+
name: orasw_meta
37+
tasks_from: umount_stage_remote
38+
tags:
39+
- nfsumountdb

roles/oraswgi_install/tasks/main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
- patch_before_rootsh
2121

2222
- name: install_home_gi | Mount nfs share with installation media
23-
ansible.builtin.mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=mounted
23+
ansible.builtin.include_role:
24+
name: orasw_meta
25+
tasks_from: mount_stage_remote
2426
tags:
25-
- nfsmountgi
26-
when: install_from_nfs
27+
- nfsmountdb
2728

2829
- name: install_home_gi | Add new dotprofile (GI)
2930
ansible.builtin.template:
@@ -156,6 +157,8 @@
156157
- olsnodes
157158

158159
- name: install_home_gi | Unmount nfs share with installation media
159-
ansible.builtin.mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=absent
160-
when: install_from_nfs
161-
tags: nfsunmountgi
160+
ansible.builtin.include_role:
161+
name: orasw_meta
162+
tasks_from: umount_stage_remote
163+
tags:
164+
- nfsumountdb

0 commit comments

Comments
 (0)