Closed bits-of-static closed 4 years ago
How have you installed Drupal VM? or which instructions did you follow since there are multiple ways. Using ../
would mean it's outside the project and would not get synced to the VM in the first place. Ansible inside the VM would look for it in /vagrant/../config/
-> /config/
.
If you're using Drupal VM as a composer dependency this is how you can set it up: http://docs.drupalvm.com/en/latest/deployment/composer-dependency/#create-a-delegating-vagrantfile
However I'm not sure what you're trying to do exactly.
I wanted to avoid polluting the git clone geerlingguy/drupal-vm
with configuration files, putting them outside.
Since the configuration mechanism is composite --yaml files overriding each other in succession-- and there are two places of application, I would expect it to be combined only once, and then passed on. The other way creates doubling, once done outside and once inside.
Which produces bug like this one here.
Ideally, this should be taken care of by vagrant. It creates the .vagrant
directory, which i assume is the context passed inside.
I will symlink the configuration directory inside the git clone and put the symlink into .gitignore. I will let you know, that will probably resolve the issue.
You might be better off using Drupal VM as a composer dependency (or git submodule) if your goal is to bring in future updates. There should be some docs on this
Yes, thank you for the suggestions - I have not yet found a setup I am comfortable with.
But I can confirm - placing the config in some subdirectory, also under a symlink, resolves the issue. Closing this one.
Issue Type
Your Environment
Your OS
Full console output
vagrant.config.yml
Summary
I already had a similar issue, described in #2081. I was able to pinpoint it a bit closer - any config file which is not in the default location, is picked up by vagrant for provisioning of the VM, but is not passed to the ansible inside the VM.
provisioning
`DRUPALVM_CONFIG_DIR="../config/" vagrant up --provision |& tee ./provision.log
Vagrant correctly starts with ../config/vagrant.config.yml
==> drupalvm--2020-09-25--da: [vagrant-hostsupdater] 168.20.9.25 da--2020-09-25.drupalvm # VAGRANT: 637b6614b6e93349128824f978c5ae83 (drupalvm--2020-09-25--da) / 473a0e50-dbba-4648-9048-33bdd6686a2a
But the provisioning ignores settings from ../config/vagrant.config.yml , one can see it including wrong role:
included: /vagrant/provisioning/roles/geerlingguy.drupal/tasks/build-composer-project.yml
instead ofbuild-composer.yml
state after provisioning
Is pretty much default.config.yml
Maybe a bug in
Vagrantfile
? I will also try to update vagrant to 2.2.10 tomorrow.