Hi. I want to force a reprovision or a redeploy on my local system. But when I run trellis up vagrant says that the system is already provisioned and if I want to force provisioning use --provision. Note that it says this even if I change my Ansible config files in some way or even if provisioning failed half way through.
My only recourse it to remove the VM and completely rebuild from scratch. Needless to say this is a major pain and makes me not even want to bother with a local dev environment.
Note, I followed the troubleshooting guide and tried
Actually, it didn’t work, I thought it was working but I get this error, which I’m not sure how to fix
==> default: Running provisioner: ansible_local...
default: Installing Ansible...
default: Installing pip... (for Ansible installation)
The requested Ansible version (2.10.7) was not found on the guest.
Please check the Ansible installation on your Vagrant guest system (currently: 2.10.17),
or adapt the provisioner `version` option in your Vagrantfile.
See https://docs.vagrantup.com/v2/provisioning/ansible_common.html#version
for more information.
I have to admit I’m a little confused about how to do a redeploy. For many things, if I just change my site on my local filesystem, the VM picks it up, which makes sense.
But I also am trying to run a custom post-install recipe on deploy, and I can’t seem to find a good way to test that locally without having to do a full re-provision, which take a good five minutes…
If you’re talking about post composer install you can run those scripts manually, ie composer run-script post-install will run all post install scripts I believe. Generally on local there is no concept of a “deploy” within the trellis paradigm; if I wanted to test that sort of thing I would do it on a remote staging environment.