engine - Operations on single or cluster layer 3 firewalls¶
New in version 2.5.
Requirements (on host that executes module)¶
- smc-python
Options¶
| parameter | required | default | choices | comments | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| antivirus |
no |
|
Enable Anti-Virus engine on the FW |
|||||||||||||||||||||||||||||||||||||||||
| backup_mgt |
no |
Specify an interface by ID that will be the backup management. If the interface is a VLAN, specify in '2.4' format (interface 2, vlan 4). |
||||||||||||||||||||||||||||||||||||||||||
| bgp |
no |
If enabling BGP on the engine, provide BGP related settings
| ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| cluster_mode |
no | standby |
|
How to perform clustering, either balancing or standby |
||||||||||||||||||||||||||||||||||||||||
| comment |
no |
Optional comment tag for the engine |
||||||||||||||||||||||||||||||||||||||||||
| default_nat |
no |
|
Whether to enable default NAT on the FW. Default NAT will identify internal networks and use the external interface IP for outgoing traffic |
|||||||||||||||||||||||||||||||||||||||||
| delete_undefined_interfaces |
no |
|
Delete interfaces from engine cluster that are not defined in the YAML file. This can be used as a strategy to remove interfaces. One option is to retrieve the full engine json using engine_facts as yaml, then remove the interfaces from the yaml and set this to True. |
|||||||||||||||||||||||||||||||||||||||||
| domain_server_address |
no |
A list of IP addresses to use as DNS resolvers for the FW. Required to enable Antivirus, GTI and URL Filtering on the NGFW. |
||||||||||||||||||||||||||||||||||||||||||
| file_reputation |
no |
|
Enable file reputation |
|||||||||||||||||||||||||||||||||||||||||
| interfaces |
yes |
Define the interface settings for this cluster interface, such as address, network and node id.
| ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| location |
no |
Location identifier for the engine. Used when engine is behind NAT. If a location is set on the engine and you want to reset to unspecified, then use the keyword None. |
||||||||||||||||||||||||||||||||||||||||||
| name |
yes |
The name of the firewall cluster to add or delete |
||||||||||||||||||||||||||||||||||||||||||
| primary_heartbeat |
no |
Specify an interface for the primary heartbeat interface. This will default to the same interface as primary_mgt if not specified. |
||||||||||||||||||||||||||||||||||||||||||
| primary_mgt |
yes |
Identify the interface to be specified as management. When creating a new cluster, the primary mgt must be a non-VLAN interface. You can move it to a VLAN interface after creation. |
||||||||||||||||||||||||||||||||||||||||||
| skip_interfaces |
no |
|
Optionally skip the analysis of interface changes. This is only relevant when running the playbook against an already created engine. This must be false if attempting to add interfaces. |
|||||||||||||||||||||||||||||||||||||||||
| 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 |
||||||||||||||||||||||||||||||||||||||||||
| snmp |
no |
SNMP settings for the engine
| ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| state |
no | present |
|
Create or delete a firewall cluster |
||||||||||||||||||||||||||||||||||||||||
| tags |
no |
Optional tags to add to this engine |
||||||||||||||||||||||||||||||||||||||||||
Examples¶
- name: Create a single layer 3 firewall
register: result
l3fw:
smc_logging:
level: 10
path: ansible-smc.log
name: myfw
mgmt_interface: 10
interfaces:
- interface_id: 0
address: 1.1.1.2
network_value: 1.1.1.0/16
zone_ref: management
- interface_id: 10
address: 10.10.10.1
network_value: 10.10.10.0/24
zone_ref: external
enable_vpn: yes
- interface_id: 11
- interface_id: 1000
address: 11.11.11.1
network_value: 11.11.11.0/24
zone_ref: awsvpn
type: tunnel_interface
domain_server_address:
- 10.0.0.1
- 10.0.0.2
default_nat: yes
enable_antivirus: yes
enable_gti: yes
enable_sidewinder_proxy: yes
tags:
- footag
# Delete a layer 3 firewall, using environment variables for credentials
- name: delete firewall by name
l3fw:
name: myfirewall
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 |
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.