Created
December 22, 2010 07:42
-
-
Save Atalanta/751231 to your computer and use it in GitHub Desktop.
This file contains 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
def apply_apt_repo_role | |
@vagrant = Vagrant::Environment.new | |
status = %x[vagrant status].split("\n")[4] | |
if status.start_with?("The VM is powered off") | |
puts ' Firing up remote VM for apt repo' | |
@vagrant.cli('up') | |
end | |
Vagrant::Config.run do |config| | |
config.chef.add_role("apt_repo") | |
end | |
@vagrant.cli('provision') | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment