Puppet Function: wls_install::jrf_cluster_configured
- Defined in:
- lib/puppet/functions/wls_install/jrf_cluster_configured.rb
- Function type:
- Ruby 4.x API
Overview
This function checks if osb cluster is configured in the specified path.
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 31 32 33 34 |
# File 'lib/puppet/functions/wls_install/jrf_cluster_configured.rb', line 9 Puppet::Functions.create_function(:'wls_install::jrf_cluster_configured') do dispatch :jrf_cluster_configured do param 'String', :domain_dir param 'String', :jrf_cluster_name return_type 'Boolean' end def jrf_cluster_configured(domain_dir, jrf_cluster_name) scope = closure_scope fact = scope['wls_install_domains'] if fact.keys.empty? call_function('wls_install::log', 'jrf_cluster_configured no domains found, return false') return false else fact.each_key do |domain| jrf = fact[domain]['jrf'] if jrf&.include?(jrf_cluster_name) && (fact[domain]['path'] == domain_dir) call_function('wls_install::log', "jrf_cluster_configured cluster found in '#{jrf}' in path '#{domain_dir}', return true") return true end end end call_function('wls_install::log', "jrf_cluster_configured no clusters found named '#{jrf_cluster_name}' with path '#{domain_dir}', return false") false end end |