Closed tomjn closed 7 years ago
I would also add,
Whether it is on vvv-config.yml
or vvv-custom.yml
appending the site simply does not work. It used to work because it only had the sites
section. Now it has, by default, two sections, sites:
and utilities:
. So when it appends the site it falls under utilities, which prevents the new provisioning system from recognizing it as a new site.
The default vvv.config.yml
now looks like this:
---
sites:
wordpress-default:
repo: https://github.com/Varying-Vagrant-Vagrants/vvv-wordpress-default.git
hosts:
- local.wordpress.dev
wordpress-develop:
repo: https://github.com/Varying-Vagrant-Vagrants/vvv-wordpress-develop.git
hosts:
- src.wordpress-develop.dev
- build.wordpress-develop.dev
#wordpress-trunk: https://github.com/Varying-Vagrant-Vagrants/vvv-wordpress-trunk.git
#multisite: https://github.com/Varying-Vagrant-Vagrants/vvv-multisite.git
#wordpress-meta-environment: https://github.com/WordPress/meta-environment.git
utilities:
core:
- memcached-admin
- opcache-status
- phpmyadmin
- webgrind
By the way, I have a basic idea about how the new provisioning system works thanks to your article. So, Thank you. :-)
We have a vm_core
section now too! You should check out the VVV 2 docs PR I've been writing.
Introducing shyaml or python as a dependency could allow this to be trivial but I'm mindful that this tool thrive because it has none. Searching for the sites:
section and appending afterwards on a new line could work, I'm sure that can be done via sed
/awk
I'd also advise to never modify vvv-config.yml
as it complicates git pull
for inexperienced developers who are just learning how things work. Copying it to vvv-custom.yml
if it doesn't exist is the best course of action
You should check out the VVV 2 docs PR I've been writing.
I should say, you have done a great job on it. It was much needed.
This command will find the sites:' section of a
vvv-custom.yml` file and add a bananorama site to the beginning:
sed '/sites:/a\'$'\n''\ bananorama:'$'\n' vvv-custom.yml
It won't edit the file itself but it's a start, I'd suggest this is what's used instead of >> vvv-config.yml
to create the site, and that a comment indicating it was added via the vv
command is included
Closing this, I'm going to start tracking 2.0 support in https://github.com/bradp/vv/issues/348.
The vv create command appends to
vvv-config.yml
, which will cause unstaged changes that prevent agit pull
to update VVV 2.Instead these changes should be made to a
vvv-custom.yml
file followed by a reprovision