--- # # installation des binaires ORACLE # - name: Création du répertoire oracle file: dest={{ item }} mode=775 owner=oracle group=oinstall state=directory recurse=yes with_items: - "{{ oracle_base }}" - "{{ oracle_inventory }}" - "{{ oracle_home }}" - "{{ oracle_sources }}" tags: createdir - name: vérification de l espace disque disponible sur oracle_base action: shell df -P {{ oracle_base }} | awk 'END { print $4 }' register: u01size failed_when: u01size.stdout|int < u01_free_space_gb*1024*1024 tags: diskfreespace - name: vérification de l espace disque disponible sur /tmp action: shell df -P /tmp | awk 'END { print $4 }' register: tmpsize failed_when: tmpsize.stdout|int < tmp_free_space_gb*1024*1024 tags: diskfreespace - name: Vérifier si une installation existe ... shell: grep "{{ oracle_home }}" "{{ oracle_inventory }}/ContentsXML/inventory.xml" | wc -l register: checkdbswinstall failed_when: checkdbswinstall.stdout != "0" tags: checkifexists - name: Téléchargement des binaires Oracle become: yes get_url: url: https://kutt.axiome.io/m7EQg2p dest: /u01/sources/{{oracle_zip_filename}} mode: 0755 group: oinstall owner: oracle checksum: sha256:ba8329c757133da313ed3b6d7f86c5ac42cd9970a28bf2e6233f3235233aa8d8 validate_certs: no tags: download_sw - name: Extraction des binaires Oracle unarchive: src={{ oracle_sources }}/{{ oracle_zip_filename }} dest={{ oracle_home }} become: true become_method: su become_user: oracle tags: extract - name: Copie du fichier de réponse pour installation silencieuse template: src=db_install_{{ oracle_version }}.j2 dest={{ oracle_sources }}/{{ db_response_file }} tags: responsefile - name: Création du script d installation silencieuse template: src=run_db_install.sh.j2 dest={{ oracle_sources }}/run_db_install.sh mode=755 tags: responsefile - name: modification du numero de distib sur Linux 8 lineinfile: dest={{ oracle_home }}/cv/admin/cvu_config state=present line="CV_ASSUME_DISTID=OEL7.6" tags: distid_ol7 - name: Installation des binaires Oracle shell: "{{ oracle_sources }}/run_db_install.sh" register: oradbinstall become: true become_method: su become_user: oracle ignore_errors: true tags: orainstall - debug: var=oradbinstall.stdout_lines # with_items: oradbinstall.results tags: orainstall - name: Vérification de l existance du fichier orainstRoot.sh stat: path="{{ oracle_inventory }}/orainstRoot.sh" register: orainstRoot - name: Exécution du script orainstRoot.sh shell: "{{ oracle_inventory }}/orainstRoot.sh" when: orainstRoot.stat.exists tags: runroot - name: Exécution du script root.sh shell: "{{ oracle_home }}/root.sh" tags: runroot - 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: opatch - debug: var=opatchls.stdout_lines # with_items: opatchls.results tags: opatch # 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 - name: suppression du script d'installation file: path={{ oracle_sources }}/run_db_install.sh state=absent - name: suppression du binaires file: path={{ oracle_sources }}/{{oracle_zip_filename}} state=absent