Closed dixhuit closed 9 years ago
Dan, I think the culprit is this line in vlad/playbooks/vars/defaults/vagrant.yml
webserver_hostname_aliases:
- 'www.drupal.local'
The variable definition there can not refer to webserver_hostname.
While it can be certainly overriden in settings.yml as a workaround, it would be better to add the drupal alias to the list in Vagrantfile
# vagrant-hostsupdater plugin will manage /etc/hosts upon up/halt/suspend.
config.hostsupdater.aliases = [
'adminer.' + boxwebaddress,
'xhprof.' + boxwebaddress,
'logs.' + boxwebaddress,
* 'drupal.' + boxwebaddress, *
boxwebaddress
] + hostname_aliases
and leave webserver_hostname_aliases empty in the default vars.
Aaah, think I've got it. I recently upgraded this project to use a more current version of Vlad and the settings didn't explicitly define any values for webserver_hostname_aliases
.
When this used to be just webserver_hostname_alias
it it used to default to www.{{ webserver_hostname }}
which meant you could get away with not setting it in settings at all.
I wonder if we can still use this as a sensible default? Will test...
@mbarcia you beat me by 25 seconds! :)
LOL
So what happens if you try expand www.{{ webserver_hostname }}
as a value for webserver_hostname_aliases
? Does it not let you override the default from your settings file?
It doesn't work, I've already tried. But see for yourself.
I don't see anything wrong with adding the drupal alias to the list of others... so it should be an easy fix.
But not everyone is going to want to use an alias containing the word "drupal".
Then use webserver_hostname_aliases in the settings.yml?
Then use webserver_hostname_aliases in the settings.yml?
Yes.
I'm interested as to why {{ webserver_hostname }}
doesn't expand properly though. I might have a play with it.
I'm interested as to why {{ webserver_hostname }} doesn't expand properly though. I might have a play with it.
Of course, Ruby doesn't expand it when the Vagrantfile imports it as plain YAML.
I'm gonna close this as it seems that the best solution is to just ensure that you set webserver_hostname_aliases
via Vlad settings per project.
As you can see, this box is called "bbp". The hosts file looks fine until you get down to the last entry which looks like Vlad's default.
Anyone else experiencing this? This is on a fairly wonky OS X system overdue for reprovisioning - just thought I'd check to see if anyone has seen this in case it is a real bug.