Defined Type: orawls::opatch

Defined in:
manifests/opatch.pp

Overview

opatch define

installs oracle patches for Oracle products

Parameters:

  • ensure (Enum['present','absent']) (defaults to: 'present')

    should exist or not

  • jdk_home_dir (String) (defaults to: $::orawls::weblogic::jdk_home_dir)

    full path to the java home directory like /usr/java/default

  • os_user (String) (defaults to: $::orawls::weblogic::os_user)

    the user name with oracle as default

  • os_group (String) (defaults to: $::orawls::weblogic::os_group)

    the group name with dba as default

  • log_output (Boolean) (defaults to: $::orawls::weblogic::log_output)

    show all the output of the the exec actions

  • download_dir (String) (defaults to: $::orawls::weblogic::download_dir)

    the directory for temporary created files by this class

  • oracle_product_home_dir (String) (defaults to: undef)

    on what Oracle home to patch should be applied

  • patch_id (Integer) (defaults to: undef)

    id of the patch

  • patch_file (String) (defaults to: undef)

    only the full name of the patch

  • puppet_download_mnt_point (String) (defaults to: $::orawls::weblogic::puppet_download_mnt_point)

    the source of the installation files

  • orainstpath_dir (Optional[String]) (defaults to: $::orawls::weblogic::orainstpath_dir)

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

  • remote_file (Boolean) (defaults to: $::orawls::weblogic::remote_file)

    to control if the filename is already accessiable on the VM



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'manifests/opatch.pp', line 19

define orawls::opatch(
  Enum['present','absent'] $ensure  = 'present',
  String $oracle_product_home_dir   = undef, # /opt/oracle/middleware11gR1
  String $jdk_home_dir              = $::orawls::weblogic::jdk_home_dir,
  Integer $patch_id                 = undef,
  String $patch_file                = undef,
  String $os_user                   = $::orawls::weblogic::os_user,
  String $os_group                  = $::orawls::weblogic::os_group,
  String $download_dir              = $::orawls::weblogic::download_dir,
  String $puppet_download_mnt_point = $::orawls::weblogic::puppet_download_mnt_point,
  Boolean $remote_file              = $::orawls::weblogic::remote_file,
  Boolean $log_output               = $::orawls::weblogic::log_output,
  Optional[String] $orainstpath_dir = $::orawls::weblogic::orainstpath_dir,
)
{
  if $ensure == 'present' {
    if $remote_file == true {
      if ! defined(File["${download_dir}/${patch_file}"]) {
        file { "${download_dir}/${patch_file}":
          ensure => file,
          source => "${puppet_download_mnt_point}/${patch_file}",
          backup => false,
          mode   => '0775',
          owner  => $os_user,
          group  => $os_group,
          before => Wls_opatch["${oracle_product_home_dir}:${patch_id}"],
        }
      }
      $disk1_file = "${download_dir}/${patch_file}"
    } else {
      $disk1_file = "${puppet_download_mnt_point}/${patch_file}"
    }
  } else {
    $disk1_file = undef
  }

  wls_opatch{"${oracle_product_home_dir}:${patch_id}":
    ensure       => $ensure,
    os_user      => $os_user,
    source       => $disk1_file,
    jdk_home_dir => $jdk_home_dir,
    orainst_dir  => $orainstpath_dir,
    tmp_dir      => $download_dir,
  }
}