external_gateway - Represents a VPN gateway that is not managed by this Management Server¶
Synopsis¶
An external VPN gateway is a VPN gateway that is not managed by the Management Server to which you are connected. An external VPN gateway can be used in either policy-based or route-based VPNs.
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 its remote site settings, such as IP address and 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 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 |
|
Create or delete flag |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tags |
no |
Any tags for this gateway |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| vpn_site |
no |
VPN sites define the networks that are reachable through 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)
connection_type: 'Active'
- address: 34.34.34.34
enabled: true
name: endpoint2 (34.34.34.34)
connection_type: 'Active 1'
- address: 44.44.44.44
enabled: true
name: extgw4 (44.44.44.44)
connection_type: 'Passive'
- address: 33.33.33.50
enabled: true
name: endpoint1 (33.33.33.50)
connection_type: 'Aggregate'
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 |
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.