Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Fixes #1355: Make Drush alias for 'local' work in VM guest or host by default. #1356

Merged
merged 2 commits into from
Apr 11, 2017
Merged
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
18 changes: 10 additions & 8 deletions scripts/drupal-vm/drupal-vm.aliases.drushrc.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// [vagrant_machine_name].local
// Local environment.
$aliases['${project.machine_name}.local'] = array(
// /var/www/[vagrant_machine_name]/docroot
'root' => '/var/www/${project.machine_name}/docroot',
// vagrant_hostname
'uri' => '${project.local.uri}',
// vagrant_hostname
'remote-host' => '${project.local.hostname}',
'remote-user' => 'vagrant',
'ssh-options' => '-o PasswordAuthentication=no -i ' . drush_server_home() . '/.vagrant.d/insecure_private_key'
);
);
// Add remote connection options when alias is used outside VM.
if ('vagrant' != $_SERVER['USER']) {
$aliases['${project.machine_name}.local'] += array(
'remote-host' => '${project.local.hostname}',
'remote-user' => 'vagrant',
'ssh-options' => '-o PasswordAuthentication=no -i ' . drush_server_home() . '/.vagrant.d/insecure_private_key'
);
}