This blog is for technical and personal posts. Over different jobs over the years I've written hundreds of articles, and now it's time to share with everyone!
Wednesday, October 22, 2014
Vagrant/Ansible trick: autoreload
When testing Ansible scripts, it's nice to have your Vagrant VM automatically re-provision itself when you change the configuration. In this way just saving a file lets you see the VM reinstall packages and so forth, with errors appearing immediately. The following runs a tiny reprovisioning script each time your Ansible YAML files change: pip install watchmedo watchmedo shell-command --drop --pattern='*.yml' --command='clear; vagrant provision'