vagrant-notify

Build Status Gem Version Gittip

A Vagrant plugin that forwards notify-send from guest to host machine and notifies provisioning status. See it in action

Installation

Make sure you have Vagrant 1.4+ around and run:

$ vagrant plugin install vagrant-notify

Usage

notify-send from guest VMs

Whenever you run vagrant up, a Ruby TCPServer will fire up on a port within the usable port range and a script will be copied over to the guest machine to replace the original notify-send command.

Provisioning notification

Apart from redirecting notify-send from the guest VM to the host, whenever a Vagrant provisioner completes running you'll also receive a notification like:

provisioning

provisioned

Linux

Since Linux distributions have notify-send pre-installed, everything should work out of the box.

OS X

You will need to create a notify-send script, available on $PATH. The script can forward the message to either Growl with GrowlNotify (version 1.2.2 is free but unreliable) or to the Notification Center available on OS X 10.8+ using f.ex. terminal-notifier.

A (too) primitive script integrating with Growl:

#!/bin/bash
growlnotify -t "Vagrant VM" -m "$*"

Demo

Demo

Known issues

  • vagrant suspend does not stop the notification server

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request