Skip to content

Instantly share code, notes, and snippets.

@feniix
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save feniix/76ac646e0f2001155980 to your computer and use it in GitHub Desktop.

Select an option

Save feniix/76ac646e0f2001155980 to your computer and use it in GitHub Desktop.
#cloud-config
# vim: syntax=yaml
packages:
- lvm2
- mc
write_files:
- content: |
#!/bin/bash -ex
echo "this is a test" > /root/test.txt
path: /root/test.sh
owner: 'root:root'
permissions: '755'
runcmd:
- /root/test.sh
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.provider "aws" do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = "otaeguis"
aws.ami = "ami-018c9568" # trusty 64 PV
aws.instance_type = "m3.medium"
aws.region = "us-east-1"
aws.security_groups = [ 'jenkins' ]
aws.tags = {
'Name' => 'blue.spantree.net',
'Hostname' => 'blue',
'fqdn' => 'blue.spantree.net',
}
aws.block_device_mapping = [
{
'DeviceName' => '/dev/sda1',
'Ebs.VolumeSize' => 50
},
{
'DeviceName' => '/dev/sdg',
'Ebs.VolumeSize' => 150
}
]
aws.user_data = File.read("cloud-init.yaml")
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "~/.ssh/id_rsa"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment