Puppet Function: wls_install::weblogic_exists
- Defined in:
- lib/puppet/functions/wls_install/weblogic_exists.rb
- Function type:
- Ruby 4.x API
Overview
This function checks if WebLogic is installed.
See the file “LICENSE” for the full license governing this code.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/puppet/functions/wls_install/weblogic_exists.rb', line 9 Puppet::Functions.create_function(:'wls_install::weblogic_exists') do dispatch :weblogic_exists do param 'String', :name return_type 'Boolean' end def weblogic_exists(name) scope = closure_scope fact = scope['wls_install_homes'] fail 'fact wls_install_homes should be a Hash' if fact.class != Hash if fact.empty? call_function('wls_install::log', 'weblogic_exists wls_install_homes empty, return false') return false elsif fact['installed_features'].key?(name) call_function('wls_install::log', "weblogic_exists middleware home '#{name}' exists, return true") return true end call_function('wls_install::log', "weblogic_exists middleware home '#{name}' not found, return false") false end end |