Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 5 hours 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-13T16:55:36.000Z (almost 2 years ago)
- Last Synced: 2023-03-01T19:23:33.713Z (over 1 year ago)
- Topics: ansible, ansible-role, aws, role, vpc
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 3
- Watchers: 24
- 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
[![Build Status](https://travis-ci.org/Flaconi/ansible-role-aws-vpc.svg?branch=master)](https://travis-ci.org/Flaconi/ansible-role-aws-vpc)
[![Version](https://img.shields.io/github/tag/Flaconi/ansible-role-aws-vpc.svg)](https://github.com/Flaconi/ansible-role-aws-vpc/tags)
[![Ansible Galaxy](https://img.shields.io/ansible/role/d/25919.svg)](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: stagingaws_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
```