Apply same improvements to oracle-db-install: organize vars (defaults/main.yml), add tags, assertions, and meta/main.yml
This commit is contained in:
29
roles/oracle-db-install/defaults/main.yml
Normal file
29
roles/oracle-db-install/defaults/main.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
# Variables par défaut surchargeables pour oracle-db-install
|
||||
|
||||
oracle_version: "19.0.0"
|
||||
oracle_base: "/u01/app/oracle"
|
||||
dbhome: "dbhome_1"
|
||||
oracle_home: "{{ oracle_base }}/product/{{oracle_version}}/{{ dbhome }}"
|
||||
oracle_inventory: "/u01/app/oraInventory"
|
||||
oracle_sources: "/u01/sources"
|
||||
oracle_oradata: "/u02/oradata/"
|
||||
oracle_fra: "/u03/fast_recovery_area/"
|
||||
oracle_install_edition: "EE"
|
||||
oracle_zip_filename: "Oracle_Database_19.3.0.0.0_for_Linux_x86-64.zip"
|
||||
|
||||
u01_free_space_gb: 8
|
||||
tmp_free_space_gb: 1
|
||||
etc_free_spage_gb: 1
|
||||
var_free_spage_gb: 1
|
||||
|
||||
db_response_file: "install_db_{{ oracle_version }}.rsp"
|
||||
|
||||
u01_size_gb: 1
|
||||
tmp_size_gb: 1
|
||||
patch_dir: "{{ oracle_sources }}"
|
||||
opatch_file: p6880880_190000_Linux-x86-64.zip
|
||||
psu_file: patch_ru.zip
|
||||
patch_number: 36233263
|
||||
|
||||
scripts_dir: "/home/oracle/scripts"
|
||||
22
roles/oracle-db-install/meta/main.yml
Normal file
22
roles/oracle-db-install/meta/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
galaxy_info:
|
||||
role_name: oracle_db_install
|
||||
author: your_name
|
||||
description: Installation des binaires Oracle Database et application des patches
|
||||
company: your_company
|
||||
|
||||
license: MIT
|
||||
|
||||
min_ansible_version: "2.10"
|
||||
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- "7"
|
||||
- "8"
|
||||
- "9"
|
||||
|
||||
galaxy_tags:
|
||||
- oracle
|
||||
- database
|
||||
- install
|
||||
- patch
|
||||
@@ -1,15 +1,25 @@
|
||||
---
|
||||
#
|
||||
#
|
||||
# installation des binaires ORACLE et patch
|
||||
#
|
||||
|
||||
- name: Vérifier les prérequis pour l'installation
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_memtotal_mb >= 4096
|
||||
- ansible_processor_vcpus >= 2
|
||||
msg: "Prérequis non satisfaits pour Oracle : RAM >= 4GB, CPU >= 2"
|
||||
tags: prerequisites
|
||||
|
||||
# installation des binaires Oracle DB
|
||||
- include_tasks: install_database.yml
|
||||
tags: install_db
|
||||
|
||||
# telechargement des fihiers : opatch + PSU-RU
|
||||
# - include_tasks: download_software.yml
|
||||
# tags: download
|
||||
|
||||
# Application du patch
|
||||
# - include_tasks: opatch_apply.yml
|
||||
# tags: patch
|
||||
|
||||
|
||||
@@ -1,35 +1,3 @@
|
||||
---
|
||||
#--------------------------------------------------------------------
|
||||
# paramètres commun
|
||||
# dans cette section ne rien modifier sauf si besoin
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
oracle_version: "19.0.0"
|
||||
oracle_base: "/u01/app/oracle"
|
||||
dbhome: "dbhome_1"
|
||||
oracle_home: "{{ oracle_base }}/product/{{oracle_version}}/{{ dbhome }}"
|
||||
oracle_inventory: "/u01/app/oraInventory"
|
||||
oracle_sources: "/u01/sources"
|
||||
oracle_oradata: "/u02/oradata/"
|
||||
oracle_fra: "/u03/fast_recovery_area/"
|
||||
oracle_install_edition: "EE" # SE2 ou EE
|
||||
oracle_zip_filename: "Oracle_Database_19.3.0.0.0_for_Linux_x86-64.zip"
|
||||
|
||||
# u01_free_space 4 Go pour l'install et 4 Go pour transfert et decompression des zip
|
||||
u01_free_space_gb: 8
|
||||
tmp_free_space_gb: 1
|
||||
etc_free_spage_gb: 1
|
||||
var_free_spage_gb: 1
|
||||
|
||||
db_response_file: "install_db_{{ oracle_version }}.rsp"
|
||||
|
||||
# Variables pour le patch
|
||||
u01_size_gb: 1
|
||||
tmp_size_gb: 1
|
||||
patch_dir: "{{ oracle_sources }}"
|
||||
opatch_file: p6880880_190000_Linux-x86-64.zip
|
||||
psu_file: patch_ru.zip
|
||||
patch_number: 36233263
|
||||
|
||||
# emplacement des sripts du compte oracle
|
||||
scripts_dir: "/home/oracle/scripts"
|
||||
# Variables communes spécifiques au rôle oracle-db-install
|
||||
# Les vars par défaut sont dans defaults/main.yml
|
||||
|
||||
Reference in New Issue
Block a user