Yes we have provisioners!

Closes #16
This commit is contained in:
Fabio Rehm 2013-03-04 01:10:09 -03:00
parent b9bb1dff1a
commit 2daabdf9fb
2 changed files with 24 additions and 1 deletions

View file

@ -27,7 +27,6 @@ sudo apt-get install lxc bsdtar
* There is no support for setting a static IP. I'm using * There is no support for setting a static IP. I'm using
[LXC's built in dns server](lib/vagrant-lxc/container.rb#L100) to determine [LXC's built in dns server](lib/vagrant-lxc/container.rb#L100) to determine
containers' IPs containers' IPs
* No provisioning [yet](https://github.com/fgrehm/vagrant-lxc/issues/16)
* `sudo`s * `sudo`s
* only ubuntu cloudimg supported, I'm still [figuring out what should go on the .box](https://github.com/fgrehm/vagrant-lxc/issues/4) * only ubuntu cloudimg supported, I'm still [figuring out what should go on the .box](https://github.com/fgrehm/vagrant-lxc/issues/4)
* "[works](https://github.com/fgrehm/vagrant-lxc/issues/20) on [my machine](https://github.com/fgrehm/vagrant-lxc/issues/7)" (TM) * "[works](https://github.com/fgrehm/vagrant-lxc/issues/20) on [my machine](https://github.com/fgrehm/vagrant-lxc/issues/7)" (TM)

View file

@ -58,6 +58,30 @@ module Vagrant
end end
end end
# This action just runs the provisioners on the machine.
def self.action_provision
Vagrant::Action::Builder.new.tap do |b|
b.use CheckLXC
b.use Vagrant::Action::Builtin::ConfigValidate
b.use Vagrant::Action::Builtin::Call, Created do |env1, b2|
if !env1[:result]
b2.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotCreated
next
end
b2.use Vagrant::Action::Builtin::Call, IsRunning do |env2, b3|
if !env2[:result]
b3.use VagrantPlugins::ProviderVirtualBox::Action::MessageNotRunning
next
end
# b3.use CheckAccessible
b3.use Vagrant::Action::Builtin::Provision
end
end
end
end
# This action starts a container, assuming it is already created and exists. # This action starts a container, assuming it is already created and exists.
# A precondition of this action is that the container exists. # A precondition of this action is that the container exists.
def self.action_start def self.action_start