diff --git a/roles/oracle-db-install/tasks/install_database.yml b/roles/oracle-db-install/tasks/install_database.yml index 40a053c..ab5d433 100644 --- a/roles/oracle-db-install/tasks/install_database.yml +++ b/roles/oracle-db-install/tasks/install_database.yml @@ -158,6 +158,36 @@ - debug: var=opatchls.stdout_lines tags: opatch + # application du patch RU + - name: patch conflict detection + action: shell export ORACLE_HOME={{ oracle_home }}; cd {{ patch_dir }}/{{ patch_number }}; $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./ + register: conflict_detection + failed_when: "'Prereq \"checkConflictAgainstOHWithDetail\" passed.' not in conflict_detection.stdout" + become: true + become_method: su + become_user: oracle + tags: patch_db + + - name: Application du patch + action: shell export ORACLE_HOME={{ oracle_home}}; cd {{ patch_dir }}/{{ patch_number }}; $ORACLE_HOME/OPatch/opatch apply -silent + register: apply_psu + failed_when: "'OPatch succeeded.' not in apply_psu.stdout" + become: true + become_method: su + become_user: oracle + tags: patch_db + + - name: Résultat de l'installation via OPatch + shell: "{{ oracle_home }}/OPatch/opatch lspatches" + become: true + become_method: su + become_user: oracle + register: opatchls + tags: patch_db + + - debug: var=opatchls.stdout_lines + tags: patch_db + # suppression des binaires, du fichier de réponse et du script d'install - name: suppression du fichier de réponse file: path={{ oracle_sources }}/{{ db_response_file }} state=absent diff --git a/roles/oracle-db-install/templates/run_db_install.sh.j2 b/roles/oracle-db-install/templates/run_db_install.sh.j2 index 277d472..f7a374b 100644 --- a/roles/oracle-db-install/templates/run_db_install.sh.j2 +++ b/roles/oracle-db-install/templates/run_db_install.sh.j2 @@ -14,6 +14,7 @@ else export CV_ASSUME_DISTID=OEL7.6 fi # Application du patch {{ patch_number }} et execution de runInstaller - {{ oracle_home }}/runInstaller -applyRU /u01/sources/{{ patch_number }} -responseFile {{ oracle_sources }}/{{ db_response_file }} -ignorePrereqFailure -silent -waitforcompletion + # {{ oracle_home }}/runInstaller -applyRU /u01/sources/{{ patch_number }} -responseFile {{ oracle_sources }}/{{ db_response_file }} -ignorePrereqFailure -silent -waitforcompletion + {{ oracle_home }}/runInstaller -responseFile {{ oracle_sources }}/{{ db_response_file }} -ignorePrereqFailure -silent -waitforcompletion fi