Skip to content

Commit 6ed3938

Browse files
committed
Update README.md
1 parent 47374aa commit 6ed3938

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
1-
# Vagrant-dependency-manager
1+
# Vagrant dependency manager
22
Simple snippet that allows you to define a list of plugins in your Vagrantfile, and manage them as dependencies.
3+
4+
I am not a Ruby programmer (yet) and this is a young software, so any issues and pull requests are always welcome!
5+
6+
## Installation
7+
8+
Just clone this package on the folder you will always do `vagrant up`, or just paste `dependency_manager.rb` on that directory.
9+
10+
## Usage
11+
12+
Include `dependency_manager.rb` in your Vagrantfile and call the function `check_plugins` with an array of plugin names.
13+
14+
`Vagrant dependency manager` will check if the named plugins are installed. If they are the boot will continue as always. If a plugin is not installed, it will perform a `vagrant plugin install 'packagename'` and continue. If the package does not exists or there is a problem with the installation, the application will exit with an error code.
15+
16+
### Example
17+
18+
```ruby
19+
# -*- mode: ruby -*-
20+
# vi: set ft=ruby :
21+
22+
require "./dependency_manager"
23+
24+
check_plugins ["vagrant-exec", "vagrant-hostsupdater", "vagrant-cachier", "vagrant-triggers"]
25+
26+
Vagrant.configure(2) do |config|
27+
28+
config.vm.box = "base"
29+
30+
end
31+
```

0 commit comments

Comments
 (0)