Hey all, I’ve just recently started using bedrock with Ansible, having used composer for a few previous projects.
The benefits of using Ansible seem quite clear to me, having just spent 5 minutes provisioning a box which would normally take a lot longer.
I’m having difficulty figuring out how I’d go about syncing the WordPress database with multiple development machines, or at least being able to use the latest version of the database.
Previously, I’ve tried having a master database, that I connected to remotely (but this was so slow). I’ve also used wpcli with capistrano to push the development database to the staging environment, then pull back to the development enviornments (but is this possible with Ansible?)
It would be great to hear from others who’ve been using Ansible with Bedrock for a while and have figured out what the best way to sync the development databases (and uploads).
Thanks in advance!
I have used both https://github.com/lavmeiker/capistrano-wpcli when using Capistrano and https://deliciousbrains.com/wp-migrate-db-pro/ when not using Capistriano.
Note that capistrano-wpcli can sync assets as well.
Is WP Migrate DB Pro the only option besides manual migration? It seems like a step backwards having to fork out $199 for something that worked really well using Bedrock with Capistrano.
I’m fairly new to vagrant and ansible, so apologies for my ignorance, having used them only briefly.
I still use Bedrock with capistrano all the time. The db and asset syncing is a killer feature for me. The configs are all here: GitHub - roots/bedrock-capistrano: Capistrano configs/integration for Bedrock
1 Like
Hey Austin, thanks for your reply. I thought that bedrock-ansible and bedrock-capistrano were two separate projects that would be incompatible if used together in one project.
I’ll take another look, and see how I can get them to work together. Thanks for your help!
Ah I see where that can get confusing.
Bedrock-capistrano can definitely be used with bedrock-ansible (soon to be renamed to Trellis). Bedrock-capistrano is just the configs from when bedrock used to include them by default.
You would probably want to choose either Ansible or Capistrano for deployments and run with it. But either way, you would still use Ansible to provision your boxes.