Skip to content

Instantly share code, notes, and snippets.

@awaxa
Created February 23, 2015 16:42
Show Gist options
  • Save awaxa/ef80f24cb8b1552ceafa to your computer and use it in GitHub Desktop.
Save awaxa/ef80f24cb8b1552ceafa to your computer and use it in GitHub Desktop.
class profile::ec2 {
$amis = {
'rhel' => {
'7' => { # https://aws.amazon.com/marketplace/pp/B00KWBZVK6
'us-east-1' => 'ami-a8d369c0',
'us-west-2' => 'ami-99bef1a9',
},
'6' => { # https://aws.amazon.com/marketplace/pp/B00CFQWLS6
'us-east-1' => 'ami-aed06ac6',
'us-west-2' => 'ami-5fbcf36f',
},
},
'centos' => { # http://wiki.centos.org/Cloud/AWS
'7' => { # https://aws.amazon.com/marketplace/pp/B00O7WM7QW
'us-east-1' => 'ami-96a818fe',
'us-west-2' => 'ami-c7d092f7',
},
'6' => { # https://aws.amazon.com/marketplace/pp/B00NQAYLWO
'us-east-1' => 'ami-c2a818aa',
'us-west-2' => 'ami-81d092b1',
},
},
}
$region = 'us-west-2'
ec2_instance { "puppet_master":
ensure => present,
image_id => $amis['rhel']['6'][$region],
instance_type => 'm3.medium',
user_data => template("${module_name}/master-pe-userdata.erb"),
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment