Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

vagrant-auto_network plugin support #155

Merged
merged 1 commit into from
Jul 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ Note: *If there are any errors during the course of running `vagrant up`, and it
### 3 - Configure your host machine to access the VM.

1. [Edit your hosts file](http://www.rackspace.com/knowledge_center/article/how-do-i-modify-my-hosts-file), adding the line `192.168.88.88 drupalvm.dev` so you can connect to the VM. Alternatively, you can install a Vagrant plugin to automatically add and remove the entry from your hosts file; run `vagrant plugin install vagrant-hostsupdater`. The plugin will also add in all other hosts defined via `apache_vhosts`.
- You can have vagrant automatically assign IP addresses to your VM by adding the vagrant-auto_network plugin (`vagrant plugin install vagrant-auto_network`).
- To use the vagrant-auto_network plugin, set the vagrant_ip setting in your config.yml file to "0.0.0.0"
NOTE: You will want to use the vagrant-hostsupdater plugin in combination with vagrant-auto_network.
2. Open your browser and access [http://drupalvm.dev/](http://drupalvm.dev/). The default login for the admin account is `admin` for both the username and password.

## Extra software/utilities
Expand Down
6 changes: 5 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.hostname = vconfig['vagrant_hostname']
config.vm.network :private_network, ip: vconfig['vagrant_ip']
if vconfig['vagrant_ip'] == "0.0.0.0" && Vagrant.has_plugin?("vagrant-auto_network")
config.vm.network :private_network, :ip => "0.0.0.0", :auto_network => true
else
config.vm.network :private_network, ip: vconfig['vagrant_ip']
end
config.ssh.insert_key = false
config.ssh.forward_agent = true

Expand Down