Defined Type: orawls::utils::orainst

Defined in:
manifests/utils/orainst.pp

Overview

utils::orainst define

creates oraInst.loc for oracle products

Parameters:

  • ora_inventory_dir (String) (defaults to: undef)

    define your own location of the Oracle inventory

  • orainstpath_dir (String) (defaults to: lookup('orawls::orainst_dir'))

    the location of orainst.loc, default it will the default directory for Linux or Solaris

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

    the group name with dba as default



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/utils/orainst.pp', line 10

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

  if !defined(File["${orainstpath_dir}/oraInst.loc"]) {
    file { "${orainstpath_dir}/oraInst.loc":
      ensure  => present,
      content => epp('orawls/utils/oraInst.loc.epp', {
                      'ora_inventory_dir' => $ora_inventory_dir,
                      'os_group'          => $os_group }),
      mode    => lookup('orawls::permissions_restricted'),
    }
  }
}