Slides for my lightning talk at Config Management Camp 2016. See the video here: https://youtu.be/qJ0VNO6z68M
Writing Vagrantfiles is tedious, especially when you’re setting up a multi-VM environment. Typically, people will copy/paste code blocks that define hosts, but that becomes unwieldy. However, a Vagrantfile is “just” Ruby, so can’t we simplify things a bit using the power of the language? Turns out, we can! In this presentation I propose a reusable Vagrantfile that reads the configuration of the environment from a simple YAML file.
See my blog post about this at https://bertvv.github.io/notes-to-self/2015/10/05/one-vagrantfile-to-rule-them-all/
12. helper functions
Helper functions:
• provision_ansible(): support running from Windows
host
• network_options(): parse Yaml config to Ruby argument
list
• custom_synced_folders()
13. Workflow
1 atb-init testbox bertvv.el7 bertvv.httpd
• Download scaffolding code from Github into directory
testbox/
• Optionally, installs roles from Ansible Galaxy
• Initialise Git repo & initial commit