3 ms·
A couple more for the list: 11. Shared folders get setup before provision scripts are run 12. You can detect provision has already run (https://github.com/has
by wildpeaks 9y ago
A couple more for the list:
11. Shared folders get setup before provision scripts are run
12. You can detect provision has already run (https://github.com/hashicorp/vagrant/issues/936#issuecomment-288063253 https://github.com/hashicorp/vagrant/issues/936#issuecomment...) using:
if File.exist?(".vagrant/machines/YOUR_BOX_ID/virtualbox/action_provision")
13. Vagrantfile configs are actually Ruby scripts, so you could do things like storing your box configs in JSON (like I did in https://github.com/wildpeaks/boilerplate-vagrant-xenial64 https://github.com/wildpeaks/boilerplate-vagrant-xenial64 ) instead of hardcoding them in the Vagrantfile.
14. Virtualbox needs Hyper-V disabled whereas Docker for Windows requires Hyper-V enabled.
- stephenr 9y agoFor 14 - just use a hyperv as your provider with Vagrant. You'll probably get better synced folder performance as a bonus.
- zwischenzug 9y agoI like 13).
- djsumdog 9y ago> Vagrantfile configs are actually Ruby scripts I took advantage of this by storing all my settings in YAML and then using the same YAML for both Vagrant and my Ansible provisioner: Here's the Ruby Script that loads the YAML: https://github.com/BigSense/vSense/blob/master/core/vagrantenv.rb https://github.com/BigSense/vSense/blob/master/core/vagrante... That I call from my Vagrant file: https://github.com/BigSense/vSense/blob/master/core/infrastructure/Vagrantfile https://github.com/BigSense/vSense/blob/master/core/infrastr... That is also loaded in all my Ansible roles: https://github.com/BigSense/vSense/blob/master/ansible/bigsense.yml https://github.com/BigSense/vSense/blob/master/ansible/bigse...