ansible/ansible-modules-core — pull request #322 by erydo (2014-11-14 00:50:37+00:00)
Title: Split out route table and subnet functionality from VPC module.

This change factors out subnet and route table creation from the creation of the VPC itself. This changes the interface of the `ec2_vpc` module to take in subnet IDs and rout_table IDs, rather than large inline definitions.

This is a fairly large change. This PR I believe supersedes the functionality of #258, from which it was developed independently. It makes sense to be merged along with #321, which is still okay on its own.

The `ec2_vpc` module now supports check mode, as do the new `ec2_vpc_subnet` and `ec2_vpc_route_table` modules.

The basic premise was: the `ec2_vpc` module does too much monolithically, and is both inflexible and difficult to use. (For example: getting meaningful subnet IDs out of the VPC creation in order to provision EC2 instances on that subnet was nigh impossible). The code was very stateful and could not support check mode.

These refactorings:

1. Make idempotent playbooks easier. Route tables are not always replaced anymore.
2. Make check mode possible for VPC setup.
3. Make it easier to refactor playbooks for VPC setup. (Subnets, route tables, etc.)
4. More easily allow advanced configurations such as instance allocation on specific subnets.
5. Clean up the stateful code considerably.
6. Generally make this module set more "ansible"-like, I believe, by splitting the configuration into finer-grained verifiable tasks.