From: Lorin Hochstein Date: Mon, 9 Feb 2015 00:57:57 +0000 (-0500) Subject: Add create-vpc.yml X-Git-Url: https://git.halfball.org/?a=commitdiff_plain;h=3cd123d3705e49f490b6e25495987f508860ca22;p=ansiblebook.git Add create-vpc.yml --- diff --git a/ch12/playbooks/create-vpc.yml b/ch12/playbooks/create-vpc.yml new file mode 100644 index 0000000..6ec0e25 --- /dev/null +++ b/ch12/playbooks/create-vpc.yml @@ -0,0 +1,30 @@ +--- +- name: create vpc + hosts: localhost + gather_facts: False + tasks: + - name: create a vpc + ec2_vpc: + internet_gateway: True + region: us-west-1 + resource_tags: { Name: "Book example", env: production } + cidr_block: 10.0.0.0/16 + subnets: + - cidr: 10.0.0.0/24 + resource_tags: + env: production + tier: web + - cidr: 10.0.1.0/24 + resource_tags: + env: production + tier: db + route_tables: + - subnets: + - 10.0.0.0/24 + - 10.0.1.0/24 + routes: + - dest: 0.0.0.0/0 + gw: igw + register: vpc + - name: print out vpc + debug: var=vpc