route_vpn - Create a route-based VPN¶
Synopsis¶
Create a route-based VPN. Route-based VPNs are typically created between a managed Forcepoint NGFW Engine and a third-party device, such as AWS or Azure. You must create the firewall before running this module. If you are configuring a route-based VPN tunnel of the VPN tunnel type, you must also specify an existing tunnel interface to bind and specify an IP address or interface ID to specify the ISAKMP listener.
Requirements (on host that executes module)¶
smc-python
Options¶
| parameter | required | default | choices | comments | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| enabled |
no |
|
Whether the VPN is enabled or disabled |
|||||||||||||||||||||||||||||||
| local_gw |
no |
Represents the locally managed Forcepoint NGFW Engine. If the remote_gw is also a managed device, use the same parameters to define it.
| ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| name |
yes |
The name for this route-based VPN. |
||||||||||||||||||||||||||||||||
| remote_gw |
no |
The name of the remote gateway. If the remote gateway is a Forcepoint NGFW Engine, it must already exist. See the local_gw documentation for settings. If the remote gateway is an external VPN gateway, this module will create the gateway based on the gateway settings provided if it does not already exist. This documents an external VPN gateway configuration. See also the external_gateway module for additional external endpoint settings.
| ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| smc_address |
no |
FQDN with port of SMC. The default value is the environment variable |
||||||||||||||||||||||||||||||||
| smc_alt_filepath |
no |
Provide an alternate path location to read the credentials from. File is expected to be stored in ~.smcrc. If provided, url and api_key settings are not required and will be ignored. |
||||||||||||||||||||||||||||||||
| smc_api_key |
no |
API key for api client. The default value is the environment variable |
||||||||||||||||||||||||||||||||
| smc_api_version |
no |
Optional API version to connect to. If none is provided, the latests LTS SMC API version will be used based on the Management Center version. Can be set though the environment variable |
||||||||||||||||||||||||||||||||
| smc_domain |
no |
Optional domain to log in to. If no domain is provided, 'Shared Domain' is used. Can be set throuh the environment variable |
||||||||||||||||||||||||||||||||
| smc_extra_args |
no |
Extra arguments to pass to login constructor. These are generally only used if specifically requested by support personnel.
| ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| smc_logging |
no |
Optionally enable SMC API logging to a file
| ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| smc_timeout |
no |
Optional timeout for connections to the SMC. Can be set through environment |
||||||||||||||||||||||||||||||||
| state |
no | present |
|
Specify a create or delete operation |
||||||||||||||||||||||||||||||
| tags |
no |
Provide an optional category tag to the engine. If the category does not exist, it will be created |
||||||||||||||||||||||||||||||||
| type |
no | ipsec |
|
The type of route-based VPN tunnel to create |
||||||||||||||||||||||||||||||
Examples¶
- name: Route VPN between internal engine and 3rd party external gateway
register: result
route_vpn:
smc_logging:
level: 10
path: ansible-smc.log
enabled: true
local_gw:
address: 50.50.50.1
name: newcluster
tunnel_interface: '1001'
name: myrbvpn
remote_gw:
external_endpoint:
- address: 33.33.33.41
enabled: true
name: extgw3 (33.33.33.41)
connection_type: 'Active 1'
- address: 34.34.34.34
enabled: true
name: endpoint2 (34.34.34.34)
connection_type: 'Active 1'
- address: 44.44.44.44
enabled: false
name: extgw4 (44.44.44.44)
connection_type: 'Active 1'
- address: 33.33.33.50
enabled: false
name: endpoint1 (33.33.33.50)
connection_type: 'Active 1'
name: extgw3
preshared_key: '********'
type: external_gateway
vpn_site:
name: extgw3-site
network:
- network-172.18.15.0/24
- network-172.18.1.0/24
- network-172.18.2.0/24
- name: Create a new Route VPN with internal gateways
route_vpn:
smc_logging:
level: 10
path: ansible-smc.log
name: myrbvpn
type: ipsec
local_gw:
name: newcluster
tunnel_interface: 1001
interface_id: 1
#address: 2.2.2.2
remote_gw:
name: myfw
tunnel_interface: 1000
interface_id: 0
tags:
- footag
Return Values¶
Common return values are documented Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| state |
The current state of the element
|
dict | ||
| changed |
Whether or not the change succeeded
|
always | bool |
Notes¶
Note
Login credential information is either obtained by providing them directly to the task/play, specifying an alt_filepath to read the credentials from to the play, or from environment variables (in that order). See http://smc-python.readthedocs.io/en/latest/pages/session.html for more information.
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.