Skip to content

Commit 1d0bbfb

Browse files
committed
Various changes
1 parent ea4d755 commit 1d0bbfb

File tree

5 files changed

+36
-32
lines changed

5 files changed

+36
-32
lines changed

orahost/tasks/main.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,18 @@
147147
- sshkeys
148148

149149
- name: filesystem | Create partition and pv
150-
script: disks.sh {{ item.value.device }}
150+
shell: parted -a optimal {{ item.value.device }} "mklabel gpt mkpart primary 1 -1"; pvcreate {{ item.value.pvname }}
151+
args:
152+
creates: "{{ item.value.pvname }}"
151153
with_dict: host_fs_layout
152154
when: configure_host_disks
153155
tags: hostfs
156+
157+
# - name: filesystem | Create partition and pv
158+
# script: disks.sh {{ item.value.device }}
159+
# with_dict: host_fs_layout
160+
# when: configure_host_disks
161+
# tags: hostf
154162

155163
- name: filesystem | Create vg
156164
lvg: vg={{ item.value.vgname }} pvs={{ item.value.pvname }} state=present vg_options="-f" # "-f used as workaround for https://github.com/ansible/ansible/pull/6859"

oraswdb-install/defaults/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,9 @@
4545
oracle_sw_image_db:
4646
- { filename: linuxamd64_12102_database_1of2.zip, version: 12.1.0.2 }
4747
- { filename: linuxamd64_12102_database_2of2.zip, version: 12.1.0.2 }
48-
# - { filename: linuxamd64_12c_database_1of2.zip, version: 12.1.0.1 }
49-
# - { filename: linuxamd64_12c_database_2of2.zip, version: 12.1.0.1 }
50-
# - { filename: p13390677_112040_Linux-x86-64_1of7.zip, version: 11.2.0.4 }
51-
# - { filename: p13390677_112040_Linux-x86-64_2of7.zip, version: 11.2.0.4 }
52-
# - { filename: p10404530_112030_Linux-x86-64_1of7.zip, version: 11.2.0.3 }
53-
# - { filename: p10404530_112030_Linux-x86-64_2of7.zip, version: 11.2.0.3 }
54-
#
48+
- { filename: linuxamd64_12c_database_1of2.zip, version: 12.1.0.1 }
49+
- { filename: linuxamd64_12c_database_2of2.zip, version: 12.1.0.1 }
50+
- { filename: p13390677_112040_Linux-x86-64_1of7.zip, version: 11.2.0.4 }
51+
- { filename: p13390677_112040_Linux-x86-64_2of7.zip, version: 11.2.0.4 }
52+
- { filename: p10404530_112030_Linux-x86-64_1of7.zip, version: 11.2.0.3 }
53+
- { filename: p10404530_112030_Linux-x86-64_2of7.zip, version: 11.2.0.3 }

oraswdb-install/tasks/main.yml

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313
tags:
1414
- nfsmountdb
1515

16-
17-
# - debug: var=checkdbswinstall.stdout
18-
# with_items: checkdbswinstall.results
19-
# when: master_node
20-
# tags:
21-
# - checkifdbinstall
22-
2316
- name: Add new dotprofile (DB)
2417
template: src=dotprofile-db.j2 dest={{ oracle_user_home }}/{{oracle_profile_name }} owner={{ oracle_user }} group={{ oracle_group }} mode=775 backup=yes
2518
with_items: oracle_databases
@@ -77,38 +70,46 @@
7770
- directoriesdb
7871

7972
- name: Transfer oracle installfiles to server (www)
80-
get_url: url={{ oracle_sw_source_www }}/{{ item.filename }} dest={{ oracle_stage }} mode=775
81-
with_items: oracle_sw_image_db
73+
get_url: url={{ oracle_sw_source_www }}/{{ item[0].filename }} dest={{ oracle_stage }} mode=775
74+
with_nested:
75+
- oracle_sw_image_db
76+
- oracle_databases
8277
sudo: yes
8378
sudo_user: "{{ oracle_user }}"
84-
when: master_node and not is_sw_source_local and oracle_sw_copy|bool
79+
when: master_node and item[0].version == item[1].oracle_version_db and not is_sw_source_local and oracle_sw_copy|bool
8580
tags:
8681
- oradbsw
8782

8883
- name: Transfer oracle installfiles to server (local)
89-
copy: src={{ oracle_sw_source_local }}/{{ item.filename }} dest={{ oracle_stage }} mode=775
90-
with_items: oracle_sw_image_db
84+
copy: src={{ oracle_sw_source_local }}/{{ item[0].filename }} dest={{ oracle_stage }} mode=775
85+
with_nested:
86+
- oracle_sw_image_db
87+
- oracle_databases
9188
sudo: yes
9289
sudo_user: "{{ oracle_user }}"
93-
when: master_node and is_sw_source_local and oracle_sw_copy|bool
90+
when: master_node and item[0].version == item[1].oracle_version_db and is_sw_source_local and oracle_sw_copy|bool
9491
tags:
9592
- oradbsw
9693

9794
- name: Extract files to stage-area
98-
unarchive: src={{ oracle_stage }}/{{ item.filename }} dest={{ oracle_stage }}/{{ item.version }} copy=no
99-
with_items: oracle_sw_image_db
95+
unarchive: src={{ oracle_stage }}/{{ item[0].filename }} dest={{ oracle_stage }}/{{ item[0].version }} copy=no
96+
with_nested:
97+
- oracle_sw_image_db
98+
- oracle_databases
10099
sudo: yes
101100
sudo_user: "{{ oracle_user }}"
102-
when: master_node and oracle_sw_copy|bool and oracle_sw_unpack|bool
101+
when: master_node and item[0].version == item[1].oracle_version_db and oracle_sw_copy|bool and oracle_sw_unpack|bool
103102
tags:
104103
- oradbswunpack
105104

106105
- name: Extract files to stage-area (from remote location)
107-
unarchive: src={{ oracle_stage_remote }}/{{ item.filename }} dest={{ oracle_stage }}/{{ item.version }} copy=no
108-
with_items: oracle_sw_image_db
106+
unarchive: src={{ oracle_stage }}/{{ item[0].filename }} dest={{ oracle_stage }}/{{ item[0].version }} copy=no
107+
with_nested:
108+
- oracle_sw_image_db
109+
- oracle_databases
109110
sudo: yes
110111
sudo_user: "{{ oracle_user }}"
111-
when: master_node and not oracle_sw_copy|bool and oracle_sw_unpack|bool
112+
when: master_node and item[0].version == item[1].oracle_version_db and not oracle_sw_copy|bool and oracle_sw_unpack|bool
112113
tags:
113114
- oradbswunpack
114115

@@ -135,8 +136,6 @@
135136
tags:
136137
- responsefileswdb
137138

138-
139-
140139
- name: Install Oracle Database Server
141140
#shell: "{{ oracle_stage_install }}/{{ item.0.oracle_version_db }}/database/runInstaller -responseFile {{ oracle_rsp_stage }}/{{ oracle_db_responsefile }} -ignorePrereq -ignoreSysPrereqs -silent -waitforcompletion"
142141
shell: "{{ oracle_rsp_stage }}/{{ oracle_db_run_install }}"

oraswgi-install/tasks/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
- directories
6363
when: checkgiinstall.stdout != "1"
6464

65-
6665
- name: Copy oracle installfiles to server (GI) (web)
6766
get_url: url={{ oracle_sw_source_www }}/{{ item.filename }} dest={{ oracle_stage }} mode=775
6867
with_items: oracle_sw_image_gi
@@ -230,7 +229,6 @@
230229
tags:
231230
- olsnodes
232231

233-
234232
- name: Unmount nfs share with installation media
235233
mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=absent
236234
tags:

oraswgi-install/templates/dotprofile-gi.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH:$SQLPATH:$GG_HOME/
3838
alias rman='rlwrap rman'
3939
alias sid='. oraenv'
4040
alias sqlp='. oraenv; sqlplus'
41-
alias sqlsys='. oraenv ;rlwrap sqlplus "/ as sysdba"'
41+
alias sqlsys='. oraenv ;rlwrap sqlplus "/ as sysasm"'
4242
#alias sqlsys='. oraenv ;rlwrap -D2 -irc -b'\''"@(){}[],+=&^%#;|\'\'' -f ~/.Scripts/tanel/tpt_public_unixmac/setup/wordfile_11gR2.txt sqlplus "/ as sysdba"'
4343
alias dbh='cd $ORACLE_HOME'
4444
alias dbb='cd $ORACLE_BASE'

0 commit comments

Comments
 (0)