Puppet Function: wls_install::ords_installed

Defined in:
lib/puppet/functions/wls_install/ords_installed.rb
Function type:
Ruby 4.x API

Overview

wls_install::ords_installed(Stdlib::Absolutepath $home, String[1] $version)Boolean

This function checks if ORDS is installed.

See the file “LICENSE” for the full license governing this code.

Parameters:

  • home (Stdlib::Absolutepath)
  • version (String[1])

Returns:

  • (Boolean)


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/puppet/functions/wls_install/ords_installed.rb', line 9

Puppet::Functions.create_function(:'wls_install::ords_installed') do
  dispatch :ords_installed do
    param 'Stdlib::Absolutepath', :home
    param 'String[1]',            :version
    return_type 'Boolean'
  end

  def ords_installed(home, version)
    scope = closure_scope
    fact = scope['ords_homes']
    return false unless fact.key?(home)

    home_fact = fact[home]
    return false if version != home_fact['version']

    true
  end
end