README - ansible-roles - A collection of ansible roles I have created over the years.
 (HTM) git clone git://jay.scot/ansible-roles
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
       README (1459B)
       ---
            1 -= jayscott.aws_vpc =-
            2 
            3 Provision AWS VPC, Subnets, Internet & NAT gateways and routes.
            4 
            5 
            6 Requirements
            7 ------------
            8 
            9 You must already have AWS access keys setup in your environment:
           10 
           11 aws_access_key_id
           12 aws_secret_access_key
           13 
           14 
           15 Role Variables
           16 --------------
           17 
           18       aws_region: us-west-2 # The region to deploy the VPC
           19       vpc_name: secuirty_vpc # A name for your VPC
           20       vpc:
           21         cidr_block: 10.0.0.0/16 # The CIDR block for the VPC
           22         nat_gateway_subnet_name: public_secuirty_subnet # The public subnet the NAT gateway will be located.
           23         tenancy: default
           24         subnets:
           25         - name: public_secuirty_subnet # Name of the subnet
           26           cidr_block: 10.0.0.0/24 # CIDR of the subnet
           27           az: us-west-2a # The Availability zone within the region
           28           gateway: igw # Type of gateway, igw = Internet Gateway, nat = NAT gateway
           29 
           30 
           31 Dependencies
           32 ------------
           33 
           34 None
           35 
           36 
           37 Example Playbook
           38 ----------------
           39 
           40 
           41     - hosts: servers
           42       vars:
           43         aws_region: us-west-2
           44         vpc_name: elk_cluster_vpc
           45         vpc:
           46           cidr_block: 10.0.0.0/16
           47           nat_gateway_subnet_name: public_elk_stack
           48           tenancy: default
           49           subnets:
           50           - name: public_elk_stack
           51             cidr_block: 10.0.0.0/24
           52             az: us-west-2a
           53             gateway: igw
           54           - name: private_elk_stack
           55             cidr_block: 10.0.1.0/24
           56             az: us-west-2a
           57             gateway: nat
           58       roles:
           59          - { role: aws_vpc }
           60