Vagrantfile plugin dependencies

90 views
Skip to first unread message

Bjorn W

unread,
Jan 8, 2014, 5:42:14 AM1/8/14
to vagra...@googlegroups.com
Hi,

I'm creating a Vagrantfile which uses https://github.com/cogitatio/vagrant-hostsupdater to automatically setup a host's /etc/hosts file so I can access Virtualhost on guests easily from the host. If I'm distributing this Vagrantfile with other people how can I make sure this plugin will be loaded for them when using my Vagrantfile?

Thanks,

grtz
BjornW 

Mitchell Hashimoto

unread,
Jan 8, 2014, 11:06:41 AM1/8/14
to vagra...@googlegroups.com
Bjorn,

At the moment, all you can do is a `Vagrant.has_plugin?` check. There is also `Vagrant.require_plugin` but that is not what you expect and is deprecated in 1.5 (does nothing). 

In the future, you'll be able to actually list out plugin dependencies, but as of now that isn't the case. The best you can do now is show an error.

Best,
Mitchell


--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Torben Knerr

unread,
Jan 8, 2014, 1:02:40 PM1/8/14
to vagra...@googlegroups.com

Hey Bjorn,

Check out bindler in the meantime:
https://github.com/fgrehm/bindler

@mitchellh: great to hear that plugin dependency management will be part of vagrant core soon!

HTH,
Torben

BjornW

unread,
Jan 8, 2014, 3:56:33 PM1/8/14
to vagra...@googlegroups.com
Hi Mitchell,

Thanks for your quick reply. I'll look into Vagrant.has_plugin and
Bindler (thanks Torben!) to solve my issue. Looking forward to see
plugin management becoming part of Vagrant.

ps: Thanks for your work on Vagrant, it is very much appreciated!

grtz
BjornW
> <mailto:vagrant-up%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vagrant-up+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.


--

met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Werkdagen:
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.

Postbus 14145
3508 SE Utrecht
The Netherlands

tel: +31 6 49 74 78 70
http://www.burobjorn.nl

John Bellone

unread,
Jan 14, 2014, 1:22:17 PM1/14/14
to vagra...@googlegroups.com
Thanks Mitchell, awesome work!
 
In the future, you'll be able to actually list out plugin dependencies, but as of now that isn't the case. The best you can do now is show an error.


Is that future 1.5? Just ran into the deprecation warning and wondering how I'm able to require a plugin. 

Dennis Stevense

unread,
Oct 19, 2014, 3:37:45 PM10/19/14
to vagra...@googlegroups.com
Hey Mitchell,

What's the latest on this? Is this still the way to go?

# Poor man's dependency management.
unless Vagrant.has_plugin?('vagrant-omnibus')
  puts 'This machine requires some plugins, please install them:'
  puts '$ vagrant plugin install vagrant-omnibus'
  exit
end

Kind regards,

Dennis
Reply all
Reply to author
Forward
0 new messages