September 3, 2015

Convert Bash script to Ansible Playbook

A simple bash script to provision a virtual host for a wordpress site, called within a Vagrant build.

Converting (and expanding) this to a playbook:

And finally, the call in Vagrant:


June 18, 2015

Rebase your database migrations to a single class file quickly

While developing, Doctrine Migrations can quickly become obsolete as you adjust your schema in the early stages of development. Nevertheless, Migrations are still a vital part of properly building compatibility for deployments. However, to consolidate and avoid having several (or in my case dozens) Migration Versions before you’ve got a stable schema, I’ve found it very useful to “rebase” my migrations to a single file. I also try to keep my non entity driven schemas in a separate file, typically Version0.php. All of my recent development work has been on Symfony 2.7 so I have a modified sessions table I use for PDO session management (that’s a separate debate we can have later)….

June 10, 2015

Setting up Ruby+Compass in Vagrant

For a variety of reasons, it appears the default bash script does not work 100% of the time in the litwicki-lemp vagrant box. So, I’ve added a simple manual step-by-step of the bash script that works. If anyone can figure out what I’ve done wrong in the bash script I’d be forever grateful!