Sha256: 2b1a6b6d817195a2f5003f6ab84e67175e679a93516e7758f69d737221386cbd
Contents?: true
Size: 1.95 KB
Versions: 6
Compression:
Stored size: 1.95 KB
Contents
module CORL module Facade #----------------------------------------------------------------------------- # Local identification def public_ip if Config.fact(:vagrant_exists) Config.fact(:ipaddress_eth1) else CORL.ip_address end end #----------------------------------------------------------------------------- # Vagrant related def vagrant? Vagrant.command ? true : false end #--- @@vagrant_config_loaded = false def vagrant_config_loaded? @@vagrant_config_loaded end def vagrant_config(directory, config, &code) require File.join(File.dirname(__FILE__), 'vagrant', 'config.rb') Vagrant::Config.register(directory, config, &code) @@vagrant_config_loaded = true end #----------------------------------------------------------------------------- # Core plugin type facade def configuration(options, provider = nil) plugin(:configuration, provider, options) end def configurations(data, build_hash = false, keep_array = false) plugins(:configuration, data, build_hash, keep_array) end #----------------------------------------------------------------------------- # Cluster plugin type facade def network(name, options = {}, provider = nil) plugin(:network, provider, Config.ensure(options).import({ :name => name })) end def networks(data, build_hash = false, keep_array = false) plugins(:network, data, build_hash, keep_array) end #--- def node(name, options = {}, provider = nil) plugin(:node, provider, Config.ensure(options).import({ :name => name })) end def nodes(data, build_hash = false, keep_array = false) plugins(:node, data, build_hash, keep_array) end #--- def provisioner(options, provider = nil) plugin(:provisioner, provider, options) end def provisioners(data, build_hash = false, keep_array = false) plugins(:provisioner, data, build_hash, keep_array) end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
corl-0.4.26 | lib/core/facade.rb |
corl-0.4.25 | lib/core/facade.rb |
corl-0.4.24 | lib/core/facade.rb |
corl-0.4.23 | lib/core/facade.rb |
corl-0.4.22 | lib/core/facade.rb |
corl-0.4.21 | lib/core/facade.rb |