Skip to content

Instantly share code, notes, and snippets.

@kdjomeda
Last active August 29, 2015 14:27
Show Gist options
  • Save kdjomeda/1f7c5aca6572ee509e0e to your computer and use it in GitHub Desktop.
Save kdjomeda/1f7c5aca6572ee509e0e to your computer and use it in GitHub Desktop.
---
# - name: Instal AWS CLI on Node(s)
# user: ubuntu
# sudo: True
# hosts: all
# tasks:
# - name: Install Python PIP
# apt: pkg=python-pip state=present
# - name: Install boto via PIP
# pip: name=boto state=latest
# - name: Install AWS CLI
# pip: name=awscli state=latest
- name: Provision Test Server
hosts: 127.0.0.1
connection: local
tasks:
- name: Create Security Group
ec2_group:
name: IntegrationProxySec
vpc_id: vpc-xxxxx
region: us-west-2
description: Access to sl proxy server
rules:
- proto: tcp
from_port: 80
to_port: 80
cidr_ip: 0.0.0.0/0
- proto: tcp
from_port: 443
to_port: 443
cidr_ip: 0.0.0.0/0
- proto: tcp
from_port: 22
to_port: 22
cidr_ip: 154.117.2.10/32
- name: Launch Instance
ec2:
key_name: ansiblekeypair.pem
group: IntegrationProxySec
instance_type: t2.micro
image: ami-a5736695
count: 1
region: us-west-2
vpc_subnet_id: subnet-xxxxxxx
instance_tags:
Name: IntegrationProxy
Env: test
Type: webserver
specific_type: nginx
register: ec2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment