Last active
February 4, 2020 17:24
-
-
Save a-nldisr/cc7c555f516cfb40204342ccb3291ed3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: 'Register Test VPC into a var' | |
ec2_vpc_net_facts: | |
filters: | |
"tag:Name": test-vpc | |
register: vpctest | |
# You probably need to change the IP for something at your side | |
- name: 'Creating Customer Gateway' | |
ec2_customer_gateway: | |
state: present | |
name: "test-cgw" | |
region: us-east-1 | |
routing: static | |
ip_address: "8.8.8.8" | |
register: cgwtest | |
- name: 'Creating Virtual Private Gateway in Test' | |
ec2_vpc_vgw: | |
state: present | |
region: "us-east-1" | |
vpc_id: "{{ vpctest.vpcs[0].vpc_id }}" | |
name: "test-vgw" | |
type: ipsec.1 | |
register: vgwtest | |
- name: 'Creating Virtual Private Network connection in Test with minimal specs' | |
ec2_vpc_vpn: | |
state: present | |
region: "us-east-1" | |
vpn_gateway_id: "{{ vgwtest.vgw.id }}" | |
customer_gateway_id: "{{ cgwtest.gateway.customer_gateway.customer_gateway_id }}" | |
static_only: yes | |
tags: | |
Name: "test-vpn" | |
# Replace the VPN id with the one you generated above. | |
- name: 'Adjust the VPN with tunnel options utilizing' | |
ec2_vpc_vpn: | |
state: present | |
filters: | |
vpn: "vpn-XXXXXX" | |
static_only: true | |
tunnel_options: | |
- | |
TunnelInsideCidr: '169.254.100.1/30' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment