-
-
Save anthonywu/e34847bebcc0a85bb37d to your computer and use it in GitHub Desktop.
autoenv demo for Vagrant + VirtualBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -c " | |
| import json | |
| with open('.vagrant/machines/default/virtualbox/synced_folders') as f: | |
| sf_content = f.read() | |
| synced_folders = json.loads(sf_content)['virtualbox'] | |
| print('Your Virtual Machine has {} synced folders\n'.format(len(synced_folders))) | |
| for sf, sf_data in synced_folders.iteritems(): | |
| print('Sync: {} --> {}'.format(sf_data['guestpath'], sf_data['hostpath'])) | |
| " |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Place this
.envin your Vagrant directory (same place as yourVagrantFileto get a reminder of your sync-ed folders. Useful when returning to the VM after some time away.Script can be extended to report on other stats.