A provisioner to configure a route from the host to a particular destination via a particular gateway, with the gateway typically being on a Vagrant-managed guest. The route is deleted if the guest is destroyed.
The implementation relies on Vagrant's host capabilities. Currently, the plugin supports only BSD hosts and in particular has been tested only on OS X. However, contributions to add support for other hosts are more than welcome.
Use vagrant plugin install
:
$ vagrant plugin install vagrant-host-route
The provisioner supports two attributes, destination
and gateway
, and
requires than both be specified.
Create a route to 10.1.1.0/24 via 10.0.5.1. It is assumed that 10.0.5.1 is an address on of the interfaces of the guest being provisioned, although strictly speaking that is not a requirement.
config.vm.provision :host_route do |host_route|
host_route.destination = "10.1.1.0/24"
host_route.gateway = "10.0.5.1"
end
- Fork it
- 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