This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Commit 6cb220b 1 parent 62e3f7e commit 6cb220b Copy full SHA for 6cb220b
File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ vagrant_hostname: ${project.local.hostname}
3
3
vagrant_machine_name : ${project.machine_name}
4
4
5
5
# Set the IP address so it doesn't conflict with other Drupal VM instances.
6
- vagrant_ip : 192.168.25.8
6
+ vagrant_ip : ${random.ip}
7
7
8
8
# Use Ubuntu 14.04 LTS to more closely match Acquia Cloud environment.
9
9
vagrant_box : geerlingguy/ubuntu1404
Original file line number Diff line number Diff line change @@ -139,7 +139,12 @@ public function config() {
139
139
->setVerbosityThreshold (VerbosityThresholdInterface::VERBOSITY_VERBOSE )
140
140
->run ();
141
141
142
- $ this ->getConfig ()->expandFileProperties ($ this ->projectDrupalVmConfigFile );
142
+ // Generate a Random IP address for the new VM.
143
+ $ config = clone $ this ->getConfig ();
144
+ $ random_local_ip = "192.168. " . rand (0 , 255 ) . '. ' . rand (0 , 255 );
145
+ $ config ->set ('random.ip ' , $ random_local_ip );
146
+
147
+ $ config ->expandFileProperties ($ this ->projectDrupalVmConfigFile );
143
148
$ vm_config = Yaml::parse (file_get_contents ($ this ->projectDrupalVmConfigFile ));
144
149
$ this ->validateConfig ($ vm_config );
145
150
You can’t perform that action at this time.
0 commit comments