Skip to content

Instantly share code, notes, and snippets.

@lpenz
Last active March 4, 2019 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpenz/6ecc3d70d36e9ed63f8e53332d4605ad to your computer and use it in GitHub Desktop.
Save lpenz/6ecc3d70d36e9ed63f8e53332d4605ad to your computer and use it in GitHub Desktop.
Vagrantfile for AWS with sshfs
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = 'dummy'
config.ssh.forward_agent = 'true'
config.vm.synced_folder '.', '/vagrant', type: 'sshfs' # only works with ubuntu
config.vm.provider :aws do |aws, override|
aws.keypair_name = ENV['AWS_KEYPAIR_NAME']
override.ssh.private_key_path = ENV['HOME']+'/.ssh/id_rsa'
# aws.ami = 'ami-6dd04501' # amazon
# aws.ami = 'ami-27b3094b' # rhel 7.2
# override.ssh.username = 'ec2-user'
aws.ami = 'ami-dc48dcb0' # ubuntu 14.04
override.ssh.username = 'ubuntu'
aws.region = 'sa-east-1'
aws.instance_type = 't2.micro'
aws.security_groups = 'ssh'
end
end
# requires: vagrant plugin install vagrant-aws vagrant-sshfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment