Defined Type: oradb::utils::dborainst

Defined in:
manifests/utils/dborainst.pp

Overview

utils::dborainst

creates oraInst.loc for oracle products

Examples:

dborainst call

oradb::utils::dborainst{'myOraInst':
  ora_inventory_dir => '/opt/oracle',
  os_group          => 'oinstall',
}

Parameters:

  • ora_inventory_dir (String) (defaults to: undef)

    full path to the ora inventory directory

  • os_group (String) (defaults to: lookup('oradb::group'))

    groupb



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'manifests/utils/dborainst.pp', line 15

define oradb::utils::dborainst
(
  String $ora_inventory_dir = undef,
  String $os_group          = lookup('oradb::group'),
){
  $ora_inst_path = lookup('oradb::orainst_dir')
  if ( $facts['kernel'] == 'SunOS'){
    if !defined(File[$ora_inst_path]) {
      file { $ora_inst_path:
        ensure => directory,
        before => File["${ora_inst_path}/oraInst.loc"],
        mode   => '0755',
      }
    }
  }

  if !defined(File["${ora_inst_path}/oraInst.loc"]) {
    file { "${ora_inst_path}/oraInst.loc":
      ensure  => present,
      content => epp('oradb/oraInst.loc.epp', {
                      'ora_inventory_dir' => $ora_inventory_dir,
                      'os_group'          => $os_group }),
      mode    => '0755',
    }
  }
}