gros update pour l'install 19c
This commit is contained in:
30
roles/oracle-db-install/tasks/download_software.yml
Normal file
30
roles/oracle-db-install/tasks/download_software.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- name: Téléchrgement des binaires
|
||||
become: yes
|
||||
get_url:
|
||||
url: https://kutt.axiome.io/m7EQg2p
|
||||
dest: /u01/sources/{{oracle_zip_filename}}
|
||||
mode: 0755
|
||||
group: oinstall
|
||||
owner: oracle
|
||||
tags: download_sw
|
||||
|
||||
- name: Téléchrgement OPatch
|
||||
become: yes
|
||||
get_url:
|
||||
url : https://kutt.axiome.io/opatch
|
||||
dest: /u01/sources/{{opatch_file}}
|
||||
mode: 0755
|
||||
group: oinstall
|
||||
owner: oracle
|
||||
tags: download_sw
|
||||
|
||||
- name: Téléchrgement du PSU
|
||||
become: yes
|
||||
get_url:
|
||||
url: https://kutt.axiome.io/db_ru
|
||||
dest: /u01/sources/{{psu_file}}
|
||||
mode: 0755
|
||||
group: oinstall
|
||||
owner: oracle
|
||||
tags: download_sw
|
||||
@@ -88,12 +88,11 @@
|
||||
tags: opatch
|
||||
|
||||
# suppression des binaires, du fichier de réponse et du script d'install
|
||||
# - name: suppression du repertoire des fichiers decompressés
|
||||
# file: path={{ oracle_sources }}/database state=absent
|
||||
#
|
||||
# - 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 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
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
---
|
||||
#
|
||||
# installation des binaires ORACLE : database
|
||||
# installation des binaires ORACLE et patch
|
||||
#
|
||||
|
||||
# ---------------------------------------------------
|
||||
# configuration Linux : Utilisateurs et groupes
|
||||
# ---------------------------------------------------
|
||||
# telechargement des fihiers : oracle DB + opatch + PSU-RU
|
||||
- include: download_software.yml
|
||||
|
||||
# installation des binaires Oracle DB
|
||||
- include: install_database.yml
|
||||
|
||||
# Application du patch
|
||||
- include: opatch_apply.yml
|
||||
|
||||
# Ajout des sripts d'exploitation
|
||||
- include: scripts_exploitation.yml
|
||||
|
||||
|
||||
71
roles/oracle-db-install/tasks/opatch_apply.yml
Normal file
71
roles/oracle-db-install/tasks/opatch_apply.yml
Normal file
@@ -0,0 +1,71 @@
|
||||
---
|
||||
- name: Vérification de l'espace disque u01
|
||||
action: shell df -P /u01 | awk 'END { print $4 }'
|
||||
register: u01size
|
||||
failed_when: u01size.stdout|int < {{ u01_size_gb }} * 1024 * 1024
|
||||
tags: patch_db
|
||||
|
||||
- name: Vérification de l'espace disque tmp
|
||||
action: shell df -P /tmp | awk 'END { print $4 }'
|
||||
register: tmpsize
|
||||
failed_when: tmpsize.stdout|int < {{ tmp_size_gb }} * 1024 * 1024
|
||||
tags: patch_db
|
||||
|
||||
- name: Installation OPatch dns ORACLE_HOME
|
||||
unarchive: src={{ patch_dir }}/{{ opatch_file }} dest={{ oracle_home }}
|
||||
# action: shell unzip -oq {{ patch_dir }}/{{ opatch_file }} -d {{ oracle_home }}
|
||||
become: true
|
||||
become_method: su
|
||||
become_user: oracle
|
||||
tags: patch_db
|
||||
|
||||
- name: unzip du patch
|
||||
unarchive: src={{ patch_dir }}/{{ psu_file }} dest={{ patch_dir }}
|
||||
# action: shell unzip -oq {{ patch_dir }}/{{ psu_file }} -d {{ patch_dir }}
|
||||
become: true
|
||||
become_method: su
|
||||
become_user: oracle
|
||||
tags: patch_db
|
||||
|
||||
- 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 lsinventory"
|
||||
become: true
|
||||
become_method: su
|
||||
become_user: oracle
|
||||
register: opatchls
|
||||
tags: patch_db
|
||||
|
||||
- debug: var=opatchls.stdout_lines
|
||||
# with_items: opatchls.results
|
||||
tags: patch_db
|
||||
|
||||
# suppression des binaires, du fichier de réponse et du script d'install
|
||||
- name: Nettoyage du répertoire du patch
|
||||
file: path={{ oracle_sources }}/{{ patch_number }} state=absent
|
||||
tags: patch_db
|
||||
|
||||
- name: suppression du fichier OPatch
|
||||
file: path={{ oracle_sources }}/{{ opatch_file }} state=absent
|
||||
tags: patch_db
|
||||
|
||||
- name: suppression du Patch RU
|
||||
file: path={{ oracle_sources }}/{{ psu_file }} state=absent
|
||||
tags: patch_db
|
||||
@@ -3,8 +3,8 @@
|
||||
# ajout de script oracle pour les backups rman
|
||||
# ---------------------------------------------------
|
||||
|
||||
- name: Copie du script backup_rman.sh dans /home/oracle/scripts
|
||||
copy: src=backup_rman.sh dest=/home/oracle/scripts/ owner=oracle group=oinstall mode=755
|
||||
# - name: Copie du script backup_rman.sh dans /home/oracle/scripts
|
||||
# copy: src=backup_rman.sh dest=/home/oracle/scripts/ owner=oracle group=oinstall mode=755
|
||||
|
||||
# ---------------------------------------------------
|
||||
# configuration Linux : config oracle pour logrotate
|
||||
|
||||
Reference in New Issue
Block a user