Skip to content

Instantly share code, notes, and snippets.

{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"ProjectName": {
"Type": "String",
"Default": "Cloudpack"
},
"PublicHostedZoneName": {
"Type": "String"
},
#!/bin/sh
yum -y update
grubby --default-kernel | grep `uname -r` || reboot
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"ProjectName": {
"Type": "String",
"Default": "Cloudpack"
},
"RoleName": {
"Type": "String",
"Default": "Ecs"
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"ProjectName": {
"Type": "String",
"Default": "suzlab"
},
"VpcId": {
"Type": "AWS::EC2::VPC::Id",
"Default": "vpc-aaaaaaaa"
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum -y install mysql-community-client
{
"variables": {
"Region": "",
"VpcId": "",
"SubnetId": "",
"Name": "",
"Epoch": "",
"SourceAmi": ""
},
"builders": [ {
- hosts: localhost
gather_facts: no
connection: local
tasks:
- name: cloudformation
cloudformation:
state: present
region: "{{ Region }}"
template: ../../cloudformation/packer.json
#!/bin/sh
EXTRA_VARS=$(cat <<EOS
Name=${Name:-suz-lab}
Region=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/.$//'`
EOS
)
ansible-playbook -v -e "$EXTRA_VARS" ./ansible/packer/ansible-amazonlinux.yml
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"VpcCidrBlock": {
"Type": "String",
"Default": "10.0.0.0/16"
}
},
"Resources": {
"Vpc": {
curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/.$//'