diff --git a/example/Vagrantfile b/example/Vagrantfile index e5402cc..068de5c 100644 --- a/example/Vagrantfile +++ b/example/Vagrantfile @@ -4,7 +4,9 @@ Vagrant.require_plugin 'vagrant-lxc' Vagrant.configure("2") do |config| - config.vm.box = "ubuntu-cloud" + config.vm.box = "ubuntu-cloud" + config.vm.hostname = 'ubuntu-cloud-box' + config.vm.provider :lxc do |lxc| # ... soon to come lxc configs... end diff --git a/lib/vagrant-lxc/action.rb b/lib/vagrant-lxc/action.rb index b42a3f8..4e0cb7e 100644 --- a/lib/vagrant-lxc/action.rb +++ b/lib/vagrant-lxc/action.rb @@ -50,7 +50,6 @@ module Vagrant b.use ShareFolders b.use Network b.use ForwardPorts - b.use HostName b.use SaneDefaults b.use Customize b.use Boot @@ -87,6 +86,7 @@ module Vagrant end b.use action_start b.use AfterCreate + b.use Vagrant::Action::Builtin::SetHostname end end @@ -122,7 +122,7 @@ module Vagrant next end - # TODO: Implement our own DestroyConfirm or propose a builtin action for Vagrant core + # TODO: Implement our own DestroyConfirm b2.use Vagrant::Action::Builtin::Call, VagrantPlugins::ProviderVirtualBox::Action::DestroyConfirm do |env2, b3| if env2[:result] b3.use Vagrant::Action::Builtin::ConfigValidate @@ -132,7 +132,7 @@ module Vagrant # TODO: VirtualBox provider has a CleanMachineFolder action, do we need something similar? # TODO: VirtualBox provider has a DestroyUnusedNetworkInterfaces action, do we need something similar? else - # TODO: Implement our own DestroyConfirm or propose a builtin action for Vagrant core + # TODO: Implement our own MessageWillNotDestroy b3.use VagrantPlugins::ProviderVirtualBox::Action::MessageWillNotDestroy end end @@ -182,7 +182,6 @@ module Vagrant class ClearForwardedPorts < BaseAction; end class PrepareForwardedPortCollisionParams < BaseAction; end class ClearSharedFolders < BaseAction; end - class HostName < BaseAction; end class Customize < BaseAction; end end end diff --git a/lib/vagrant-lxc/action/is_running.rb b/lib/vagrant-lxc/action/is_running.rb index 194ec3e..d3087b7 100644 --- a/lib/vagrant-lxc/action/is_running.rb +++ b/lib/vagrant-lxc/action/is_running.rb @@ -3,7 +3,6 @@ module Vagrant module Action class IsRunning < BaseAction def call(env) - # Set the result to be true if the machine is created. env[:result] = env[:machine].state.running? # Call the next if we have one (but we shouldn't, since this