https://github.com/flaconi/ansible-role-aws-vpc
Ansible role to create an arbitrary number of VPC's on AWS
https://github.com/flaconi/ansible-role-aws-vpc
ansible ansible-role aws role vpc
Last synced: about 1 year ago
JSON representation
Ansible role to create an arbitrary number of VPC's on AWS
- Host: GitHub
- URL: https://github.com/flaconi/ansible-role-aws-vpc
- Owner: Flaconi
- License: apache-2.0
- Created: 2018-05-22T12:10:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T16:55:36.000Z (over 3 years ago)
- Last Synced: 2025-03-29T07:51:18.125Z (over 1 year ago)
- Topics: ansible, ansible-role, aws, role, vpc
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 25
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible role: AWS VPC
This role handles the creation of AWS VPC's
[](https://travis-ci.org/Flaconi/ansible-role-aws-vpc)
[](https://github.com/Flaconi/ansible-role-aws-vpc/tags)
[](https://galaxy.ansible.com/Flaconi/aws-vpc/)
## Requirements
* Ansible 2.6
* [botocore](https://pypi.org/project/botocore/)
* [boto3](https://pypi.org/project/boto3/)
## Additional variables
Additional variables that can be used (either as `host_vars`/`group_vars` or via command line args):
| Variable | Description |
|--------------------------|------------------------------|
| `aws_vpc_profile` | Boto profile name to be used |
| `aws_vpc_default_region` | Default region to use |
## Example definition
#### Required parameter only
```yml
aws_vpc_vpcs:
- name: my-vpc-1
cidr: 172.28.0.0/16
- name: my-vpc-2
cidr: 172.29.0.0/16
```
#### All available parameter
```yml
aws_vpc_vpcs:
- name: my-vpc-1
cidr: 172.28.0.0/16
# Optional
region: eu-central-1
tags:
- key: env
val: development
- key: department
val: infra
- name: my-vpc-2
cidr: 172.29.0.0/16
# Optional
region: eu-central-1
tags:
- key: env
val: production
- key: department
val: devops
```
#### Variablized tags
```yml
my_key: env
my_val: staging
aws_vpc_vpcs:
- name: my-vpc-1
cidr: 172.28.0.0/16
# Optional
region: eu-central-1
tags:
- key: "{{ my_key }}"
val: "{{ my_val }}"
```
## Testing
#### Requirements
* Docker
* [yamllint](https://github.com/adrienverge/yamllint)
#### Run tests
```bash
# Lint the source files
make lint
# Run integration tests with default Ansible version
make test
# Run integration tests with custom Ansible version
make test ANSIBLE_VERSION=2.6
```