Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 8617fe1

Browse files
authored
Merge pull request #1562 from oxyc/issue-1520
Fixes #1520: Let local.config.yml override environment.config.yml
2 parents e24ace9 + 066ef09 commit 8617fe1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Vagrantfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ end
2323
vconfig = load_config([
2424
default_config_file,
2525
"#{host_config_dir}/config.yml",
26-
"#{host_config_dir}/local.config.yml",
27-
"#{host_config_dir}/#{drupalvm_env}.config.yml"
26+
"#{host_config_dir}/#{drupalvm_env}.config.yml",
27+
"#{host_config_dir}/local.config.yml"
2828
])
2929

3030
provisioner = vconfig['force_ansible_local'] ? :ansible_local : vagrant_provisioner

docs/getting-started/configure-drupalvm.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ vagrant_machine_name: my_custom_site
2020
php_version: "5.6"
2121
```
2222
23-
#### 3. local.config.yml
23+
#### 3. vagrant.config.yml
24+
25+
Environment specific overrides. When you run Drupal VM through _Vagrant_, the environment will be set to `vagrant` and this file is loaded when available. If you're doing something more advanced, such as running Drupal VM on a [production environment](../other/production.md), you can use a different environment configuration file, eg `prod.config.yml`.
26+
27+
_Note: In addition to the variables listed in `default.config.yml`, you can also override the variables set by any of the ansible roles. In the "Installed extras" section of this documentation, each role has a link to the available variables._
28+
29+
#### 4. local.config.yml
2430

2531
Local development overrides. Commonly this file is ignored from VCS so that each team member can make local customizations.
2632

@@ -37,12 +43,6 @@ vagrant_synced_folders:
3743
create: true
3844
```
3945

40-
### 4. vagrant.config.yml
41-
42-
Environment specific overrides. When you run Drupal VM through _Vagrant_, the environment will be set to `vagrant` and this file is loaded when available. If you're doing something more advanced, such as running Drupal VM on a [production environment](../other/production.md), you can use a different environment configuration file, eg `prod.config.yml`.
43-
44-
_Note: In addition to the variables listed in `default.config.yml`, you can also override the variables set by any of the ansible roles. In the "Installed extras" section of this documentation, each role has a link to the available variables._
45-
4646
## Additional resources
4747

4848
- Jeff Geerling's DrupalDC talk "[Drupal VM Tips and Tricks for Drupal 8 development](https://www.youtube.com/watch?v=_wV6MDsT42Y)"

provisioning/tasks/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
include_vars: "{{ item }}"
1212
with_fileglob:
1313
- "{{ config_dir }}/config.yml"
14-
- "{{ config_dir }}/local.config.yml"
1514
- "{{ config_dir }}/secrets.yml"
1615
- "{{ config_dir }}/{{ lookup('env', 'DRUPALVM_ENV')|default(drupalvm_env, true)|default(ansible_env.DRUPALVM_ENV)|default(omit) }}.config.yml"
16+
- "{{ config_dir }}/local.config.yml"

0 commit comments

Comments
 (0)