class VagrantPlugins::CORL::Provisioner::CORL
Public Class Methods
new(machine, config)
click to toggle source
Calls superclass method
# File lib/core/vagrant/provisioner/provisioner.rb 10 def initialize(machine, config) 11 super 12 end
Public Instance Methods
configure(root_config)
click to toggle source
# File lib/core/vagrant/provisioner/provisioner.rb 17 def configure(root_config) 18 end
provision()
click to toggle source
# File lib/core/vagrant/provisioner/provisioner.rb 22 def provision 23 @machine.communicate.tap do |comm| 24 unless ::CORL::Vagrant.command 25 # Hackish solution to ensure our code has access to Vagrant machines. 26 # This serves as a Vagrant VM manager. 27 ::CORL::Vagrant.command = Command::Launcher.new([], @machine.env) 28 end 29 30 network = config.network 31 node = config.node 32 33 if network && node 34 # Provision the server 35 success = network.init_node(node, clean(::CORL.config(:vagrant_node_init, { 36 :force => config.force_updates, 37 :home => config.user_home, 38 :home_env_var => config.user_home_env_var, 39 :root_user => config.root_user, 40 :root_home => config.root_home, 41 :bootstrap => config.bootstrap, 42 :bootstrap_path => config.bootstrap_path, 43 :bootstrap_glob => config.bootstrap_glob, 44 :bootstrap_init => config.bootstrap_init, 45 :bootstrap_scripts => config.bootstrap_scripts, 46 :reboot => config.reboot, 47 :dev_build => config.dev_build, 48 :ruby_version => config.ruby_version, 49 :auth_files => config.auth_files, 50 :seed => config.seed, 51 :project_reference => config.project_reference, 52 :project_branch => config.project_branch, 53 :environment => config.environment, 54 :build => config.build, 55 :provision => config.provision, 56 :dry_run => config.dry_run 57 }).export)) 58 59 node.warn("CORL provisioner failed", { :i18n => false }) unless success 60 end 61 end 62 end
Protected Instance Methods
clean(options)
click to toggle source
# File lib/core/vagrant/provisioner/provisioner.rb 67 def clean(options) 68 options.keys.each do |key| 69 value = options[key] 70 if value.nil? 71 options.delete(key) 72 end 73 end 74 options 75 end