Puppet Class: oracle_inventory::inventory_pointer

Inherits:
oracle_inventory
Defined in:
manifests/inventory_pointer.pp

Summary

Manages the Oracle central inventory location pointer.

Overview

oracle_inventory::inventory_pointer

This class manages the Oracle central inventory location pointer.

Examples:

include oracle_inventory::inventory_pointer

Parameters:

  • ensure (Any) (defaults to: $::oracle_inventory::ensure)

    Should the pointer file exist

  • file_owner (Any) (defaults to: $::oracle_inventory::file_owner)

    Pointer file owner

  • file_group (Any) (defaults to: $::oracle_inventory::file_group)

    Pointer file group

  • file_mode (Any) (defaults to: $::oracle_inventory::file_mode)

    Pointer file permissions

  • pointer_file (Any) (defaults to: $::oracle_inventory::pointer_file)

    Full path to the pointer file

  • inventory_dir (Any) (defaults to: $::oracle_inventory::inventory_dir)

    Directory for the inventory_loc entry in the pointer file

  • inst_group (Any) (defaults to: $::oracle_inventory::inst_group)

    Value for the inst_group entry in the pointer file



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
# File 'manifests/inventory_pointer.pp', line 30

class oracle_inventory::inventory_pointer (
  $ensure        = $::oracle_inventory::ensure,
  $file_owner    = $::oracle_inventory::file_owner,
  $file_group    = $::oracle_inventory::file_group,
  $file_mode     = $::oracle_inventory::file_mode,
  $pointer_file  = $::oracle_inventory::pointer_file,
  $inventory_dir = $::oracle_inventory::inventory_dir,
  $inst_group    = $::oracle_inventory::inst_group,
) inherits oracle_inventory {
  if defined('$pointer_file') and !empty($pointer_file) {
    $inventory_loc = defined('$::oracle_inventory') ? {
      true    => regsubst($::oracle_inventory, '/ContentsXML.+', ''),
      default => $inventory_dir
    }

    $real_content = $ensure ? {
      'absent' => undef,
      default  => @("EOT")
        inventory_loc=${inventory_loc}
        inst_group=${inst_group}
        | EOT
    }

    file { $pointer_file:
      ensure  => $ensure,
      owner   => $file_owner,
      group   => $file_group,
      mode    => $file_mode,
      content => $real_content,
    }
  }
}