From 3cd123d3705e49f490b6e25495987f508860ca22 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Sun, 8 Feb 2015 19:57:57 -0500 Subject: [PATCH] Add create-vpc.yml --- ch12/playbooks/create-vpc.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ch12/playbooks/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 -- 2.44.0