This repository contains the network.vpn
Ansible Collection.
An Ansible Collection to build, maintain and validate VPN tunnels across cloud providers and network appliances.
See Supported Providers
section for more details.
Tested with ansible-core >=2.15 releases.
To consume this Validated Content from Automation Hub, the following needs to be added to ansible.cfg
:
[galaxy]
server_list = automation_hub
[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<SuperSecretToken>
Get the required token from the Automation Hub Web UI.
With this configured, simply run the following commands:
ansible-galaxy collection install network.vpn
---
- name: Deploy and validate AWS and Azure tunnels
hosts: localhost
gather_facts: true
tasks:
- name: "Run network.vpn collection with specified operations"
ansible.builtin.include_role:
name: network.vpn.run
vars:
operations:
- name: deploy
vars:
provider: aws
configuration_file: aws.yaml
- name: deploy
vars:
provider: azure
configuration_file: azure.yaml
- name: validate
vars:
provider: aws
tunnel: 1
session_status: UP
- name: validate
vars:
provider: azure
resource_group: VPN-RG
vpn_connection_name: Azure-to-AWS
session_status: Connected
---
- name: Deploy and Validate CSR tunnels
hosts: csr_gateways
gather_facts: true
tasks:
- name: "Run network.vpn collection with specified operations"
ansible.builtin.include_role:
name: network.vpn.run
vars:
provider: csr
operations:
- name: deploy
vars:
configuration_file: "{{ inventory_hostname }}.yaml"
- name: validate
vars:
tunnel: Tunnel0
session_status: Connected
Provider | Operations | Operation Options |
---|---|---|
aws | deploy | Options |
validate | Options | |
azure | deploy | Options |
validate | Options | |
csr | deploy | Options |
validate | Options |
The following collections should be installed:
- azure.azcollection
- cisco.ios
- community.aws
This collection follows the Ansible project's Code of Conduct. Please read and familiarize yourself with this document.
Release notes are available here.
GNU General Public License v3.0 or later.
See COPYING to see the full text.