It's possible I'm going about this all wrong, and I should be setting up my aliases file differently.
We have a set up with 4 load-balanced production servers running the same code and accessing the same database. I want to set up a drush aliases file to access them by a short name and also allow commands to be run on all of them simultaneously. Here's what I have so far, in ~/.drush/cust.aliases.drushrc.php
:
<?php
$aliases['production'] = array (
'root' => '/var/www/cust',
'uri' => 'www.example.com',
'databases' => array(
'default' => array(
'default' => array(
'database' => '...',
'username' => '...',
'password' => '...',
'host' => '...',
'port' => '3306',
'driver' => 'mysql',
),
),
),
'site-list' => array(
'production.1',
'production.2',
'production.3',
'production.4',
),
);
$aliases['production.1'] = array (
'parent' => '@production',
'remote-host' => '...',
'site-list' => array(),
);
$aliases['production.2'] = array (
'parent' => '@production',
'remote-host' => '...',
);
$aliases['production.3'] = array (
'parent' => '@production',
'remote-host' => '...',
);
$aliases['production.4'] = array (
'parent' => '@production',
'remote-host' => '...',
);
?>
Now the problem I have is that the site-list
variable is being added to the individual definitions, so the site-ssh
command thinks that they are a list. I've tried a few things to sort this out, including adding 'site-list' => NULL
, 'site-list' => array()
and 'site-list' => ''
to the the production.x
definitions, but this doesn't work since site-ssh
just uses isset
. Neither do my attempts to use the unset
function because the inheritance happens after I've tried to unset it.