This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |