On Debian and Ubuntu guests, when the new hostname of the guest box is
set, the DHCP client (isc-dhcp-client) won't renew its DHCP lease with
the new hostname. Executing "ifdown -a; ifup -a" to reinitialize all auto
interfaces fixes this issue.
Furthermore, as vagrant will now actually wait until a DHCP lease is
acquired, it is guaranteed that the the correct domainname is set from
DHCP before calling other provisioners like puppet, that rely on it.
This fixes puppet/facter sometimes failing to find the fqdn fact on an
LXC guest when the DHCP server is responding too slow.
- Tested on mountainlion/virtualbox
- virtualbox shared folders will not work (no vboxvsf support)
- Must use at least 2GB of RAM or the os will refuse to boot(mountainlion requirement)
To begin, create a mountainlion vm in virtualbox. You will need to install from scratch most likely, and assign at least 2GB of ram for it to install.
Create 2 network interfaces, the first one a NAT interface, second a hostonly interface.
'vagrant package' the VM.
In your vagrant file, be sure that the synced folder is disabled:
config.vm.synced_folder "vagrant", "/vagrant", disabled: true
The version_number regex was causing an error because my /etc/redhat-release looks like this:
Fedora Core release 6 (Zod)
This fix allowed initialize to run just fine on my ridiculously old release.
This mimics the equivalent feature from the chef_solo provisioner, and
mounts the puppet manifests and modules with NFS. Doing so can greatly
shortens the time of a puppet run if you have many .pp files.
Enabling this is optional. Virtualbox's (or any other provider's) shared
folders method stays the default. A typical usage would look like this:
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppetmaster/manifests"
puppet.module_path = ["puppetmaster/modules"]
puppet.manifest_file = "site.pp"
puppet.nfs = true
end
This fixes#1308.
The RDoc comments for `Vagrant::Action::Builder#to_app` reference an
instance of `Vagrant::Action::Environment` as the passed paramter. There
is no class `Vagrant::Action::Environment` available. The param being
passed is actually a `Hash` that represents the "action environment".
This commit corrects the RDoc lines for
`Vagrant::Action::Builder#to_app` to correctly reference the passed
`Hash`.