Vagrant plugin for displaying custom box info in vagrant self-hosted environments via metadata. (more on Vagrant metadata file here).
Add this line to your application's Gemfile:
$ vagrant plugin install vagrant-boxinfo
$ vagrant boxinfo <url or box_name>
Imagine you host vagrant boxes which are used for LAMP development. Different box versions can have different versions of MySQL, PHP, etc.
Suppose you have metadata.json
with following content on your server:
{
"name": "lampbox",
"description": "Vagrant box for LAMP development based on Ubuntu 14.04",
"versions": [
{
"version": "1.0.1",
"php_version": "5.5.22",
"mysql_version": "5.6.23",
"apache_version": "2.4.12",
"providers": [
{
"name": "virtualbox",
"url": "http://myvagranthost.com/lambox-1.0.1.box",
}
]
},
{
"version": "1.0.0",
"php_version": "5.5.21",
"mysql_version": "5.6.22",
"apache_version": "2.4.12",
"providers": [
{
"name": "virtualbox",
"url": "http://myvagranthost.com/lambox-1.0.0.box",
}
]
}
]
}
$ vagrant box list
lampbox (virtualbox, 1.0.0)
$ vagrant boxinfo lambox
Reading url http://myvagranthost.com/metadata.json...
Box name: lampbox
Description: Vagrant box for LAMP development based on Ubuntu 14.04
1.0.1
php_version: 5.5.22
mysql_version: 5.6.23
apache_version: 2.4.12
downloaded: false
1.0.0
php_version: 5.5.21
mysql_version: 5.6.22
apache_version: 2.4.12
downloaded: true
If you currently don't have downloaded any version of lampbox, you have to pass
full url of metadata.json
to boxinfo command.
- Fork it ( https://github.com/[my-github-username]/vagrant-boxinfo/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request