ansible_aws_vpc

Provision AWS VPC, Subnets, Internet and NAT gateways and routes.
git clone git://git.beardyjay.co.uk/ansible_aws_vpc
Log | Files | Refs | README

README.md (1437B)


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