Skip to content

Instantly share code, notes, and snippets.

View gcmalloc's full-sized avatar

Malik Bougacha gcmalloc

  • Lausanne, Switzerland
View GitHub Profile
from fabric.api import *
import vagrant
def with_vagrant(vm_name=None):
"""Apply the rule with the vagrant box."""
print("applying on box {}".format(vm_name))
v = vagrant.Vagrant()
if not all([status == "running" for status in v.status().values()]):
print("Vagrant is not running, starting it right now.")
v.up()