external_gateway - Represents a 3rd party gateway used for a VPN configuration¶
New in version 2.5.
Synopsis¶
- An external gateway is a non-SMC managed VPN endpoint used in either policy or route based VPN.
Requirements (on host that executes module)¶
- smc-python
Options¶
| parameter | required | default | choices | comments | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| external_endpoint |
no |
An endpoint represents an external VPN gateway and it's remote site settings such as IP address, remote site networks, etc.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name |
yes |
The name of the external gateway |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 latest SMC version API 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 |
|
Create or delete flag |
||||||||||||||||||||||||||||||||||||||||||||||||||
| tags |
no |
Any tags for this gateway |
||||||||||||||||||||||||||||||||||||||||||||||||||||
| vpn_site |
no |
VPN sites defined the networks for this VPN. A site entry should be a network CIDR address. If the network does not exist, the element will be created.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
Examples¶
- name: Create a static IP based external gateway
register: result
external_gateway:
smc_logging:
level: 10
path: ansible-smc.log
external_endpoint:
- address: 33.33.33.41
enabled: true
name: extgw3 (33.33.33.41)
- address: 34.34.34.34
enabled: true
name: endpoint2 (34.34.34.34)
- address: 44.44.44.44
enabled: true
name: extgw4 (44.44.44.44)
- address: 33.33.33.50
enabled: true
name: endpoint1 (33.33.33.50)
name: extgw3555
vpn_site:
group:
- hostgroup
host:
- hosta
name: site12a
network:
- network-172.18.1.0/24
- network-172.18.2.0/24
- name: Delete an external gateway
external_vpn_gw:
name: myextgw
state: absent
Return Values¶
Common return values are documented Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| state |
Output of operations performed on gateway
|
always | list |