Created
January 28, 2014 21:34
-
-
Save jonasfj/8676999 to your computer and use it in GitHub Desktop.
Carry AWS credentials into vagrantfile...
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
if ENV['AWS_ACCESS_KEY_ID'] == nil or ENV['AWS_SECRET_ACCESS_KEY'] == nil | |
raise Vagrant::Errors::VagrantError.new, | |
"This vagrantfile requires AWS credentials as environment variables!\n" | |
end | |
Vagrant.configure("2") do |config| | |
config.vm.box = "jonasfj-taskcluster-dev-0.0.0" | |
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/20140126/saucy-server-cloudimg-amd64-vagrant-disk1.box" | |
config.vm.provision "shell", inline: <<-SCRIPT | |
echo 'export AWS_ACCESS_KEY_ID="#{ENV['AWS_ACCESS_KEY_ID']}";' >> /home/vagrant/.bashrc; | |
echo 'export AWS_SECRET_ACCESS_KEY="#{ENV['AWS_SECRET_ACCESS_KEY']}";' >> /home/vagrant/.bashrc; | |
SCRIPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment