aws-vpc-vgw

Ansible role: AWS VPC VGW

This role is able to create any number of Virtual Gateways, each attached to a VPC in AWS.

Build Status Version Ansible Galaxy

Requirements

  • Ansible 2.5

Additional variables

Additional variables that can be used (either as host_vars/group_vars or via command line args):

Variable Description
aws_vpc_vgw_profile Boto profile name to be used
aws_vpc_vgw_default_region Default region to use
aws_vpc_vgw_vpc_filter_additional Additional key val filter to add to vpc_filter and vpc_name by default.

Example definition

VGW's can be created per VPC either by supplying a VPC name or a VPC filter.

Required parameter only

aws_vpc_vgws:
  # Create VGW for a VPC by VPC name
  - name: vgw-test-1
    vpc_name: devops-test-vpc-1
  # Create VGW for a VPC by VPC filter
  - name: vgw-test-2
    vpc_filter:
      - key: "tag:Name"
        val: "devops-test-vpc-2"
      - key: "tag:env"
        val: playground
      - key: "tag:department"
        val: devops

All available parameter

# Ensure VPC filter (name or filter) includes that the VPC is created already
# (not pending nor deleted)
aws_vpc_vgw_vpc_filter_additional:
  - key: state
    val: available

aws_vpc_vgws:
  # Create VGW for a VPC by VPC name
  - name: vgw-test-1
    vpc_name: devops-test-vpc-1
    region: eu-central-1
    tags:
      - key: env
        val: playground
      - key: department
        val: devops
  # Create VGW for a VPC by VPC filter
  - name: vgw-test-2
    vpc_filter:
      - key: "tag:Name"
        val: "devops-test-vpc-2"
      - key: "tag:env"
        val: playground
      - key: "tag:department"
        val: devops
    region: eu-central-1
    tags:
      - key: env
        val: playground
      - key: department
        val: devops

Testing

Requirements

Run tests

# 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.4
About

Creates an arbitrary number of VGW's for any VPC on AWS

Install
ansible-galaxy install Flaconi/ansible-role-aws-vpc-vgw
GitHub repository
License
apache-2.0
Downloads
24