File tree Expand file tree Collapse file tree 3 files changed +37
-2
lines changed
roles/oraswdb_install/tasks Expand file tree Collapse file tree 3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 11---
22- name : install_home_db | Install Oracle Database Server
3- ansible.builtin.command : " {{ oracle_home_db }}/runInstaller -responseFile {{ oracle_rsp_stage }}/{{ oracle_db_responsefile }} -ignorePrereq -silent -waitforcompletion"
3+ ansible.builtin.command : " {{ oracle_home_db }}/runInstaller -responseFile {{ oracle_rsp_stage }}/{{ oracle_db_responsefile }} -ignorePrereq -silent -waitforcompletion {% if db_homes_config[dbh.home]['oracle_home_name'] is defined %}ORACLE_HOME_NAME={{ db_homes_config[dbh.home]['oracle_home_name'] }}{% endif %} "
44 become : true
55 become_user : " {{ oracle_user }}"
66 run_once : " {{ configure_cluster }}"
1818 tags :
1919 - oradbinstall
2020 ignore_errors : true
21+
22+ - include_tasks : roohctl.yml
Original file line number Diff line number Diff line change 11---
22- name : install_home_db | Install Oracle Database Server
3- ansible.builtin.command : " {{ oracle_home_db }}/runInstaller -responseFile {{ oracle_rsp_stage }}/{{ oracle_db_responsefile }} -ignorePrereq -silent -waitforcompletion"
3+ ansible.builtin.command : " {{ oracle_home_db }}/runInstaller -responseFile {{ oracle_rsp_stage }}/{{ oracle_db_responsefile }} -ignorePrereq -silent -waitforcompletion {% if db_homes_config[dbh.home]['oracle_home_name'] is defined %}ORACLE_HOME_NAME={{ db_homes_config[dbh.home]['oracle_home_name'] }}{% endif %} "
44 become : true
55 become_user : " {{ oracle_user }}"
66 run_once : " {{ configure_cluster }}"
1818 tags :
1919 - oradbinstall
2020 ignore_errors : true
21+
22+ - include_tasks : roohctl.yml
Original file line number Diff line number Diff line change 1+ ---
2+ # we need a known value for ORACLE_HOME_NAME for later usage in ansible-oracle
3+ - name : install_home_db | Check Inventory for enabled readonly home
4+ ansible.builtin.assert :
5+ fail_msg : Missing oracle_home_name key in db_homes_config for enabled readonly_home
6+ that :
7+ - db_homes_config[dbh.home]['oracle_home_name'] is defined
8+ when :
9+ - db_homes_config[dbh.home]['readonly_home'] | default(false)
10+
11+ - name : install_home_db | Configure Read Only Oracle Home
12+ ansible.builtin.command : " {{ oracle_home_db }}/bin/roohctl {% if db_homes_config[dbh.home]['readonly_home'] | default(false) %}-enable{% else %}-disable{% endif %}"
13+ become : true
14+ become_user : " {{ oracle_user }}"
15+ run_once : " {{ configure_cluster }}"
16+ when :
17+ - oracle_home_db not in existing_dbhome.stdout_lines
18+ tags :
19+ - roohctl
20+ register : roohctl
21+ failed_when : roohctl.rc not in [0]
22+
23+ - ansible.builtin.debug : var=roohctl.stdout_lines
24+ # noqa unnamed-task ignore-errors
25+ run_once : " {{ configure_cluster }}"
26+ when :
27+ - oracle_home_db not in existing_dbhome.stdout_lines
28+ - roohctl.changed
29+ tags :
30+ - roohctl
31+ ignore_errors : true
You can’t perform that action at this time.
0 commit comments