engine_routing - Routing configurations on NGFW Engines¶
Synopsis¶
Use this module to add or remove static routes, antispoofing entries, BGP, OSPF, or NetLink elements to the routing configuration on an NGFW Engine. You can use engine_facts to dump the engine configuration or use engine_routing_facts to specifically dump only the routing table.
Requirements (on host that executes module)¶
smc-python
Options¶
| parameter | required | default | choices | comments | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| antispoofing_network |
no |
List of antispoofing entries
| |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
| bgp_peering |
no |
List of dict describing the BGP peering to add
| |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
| name |
yes |
The name of the single firewall or firewall cluster on which to access the routing table |
|||||||||||||||||||||||||||
| netlink |
no |
List of dicts describing the NetLinks
| |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
| ospfv2_area |
no |
List of dict describing the OSPF areas to add
| |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
| 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 |
|
Add or remove the routing entry. If state=absent any defined routing configurations are considered a removal action. |
|||||||||||||||||||||||||
| static_route |
no |
List of static routes
| |||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||
Examples¶
- name: Engine routing configuration
hosts: localhost
gather_facts: no
tasks:
- name: Add routing elements to engine sg_vm
engine_routing:
smc_logging:
level: 10
path: ansible-smc.log
name: sg_vm
bgp_peering:
- destination:
- name: bgppeer
type: external_bgp_peer
interface_id: '1000'
name: bgppeering
ospfv2_area:
- interface_id: '2.1'
name: myarea
network: 21.21.21.0/24
destination:
- name: myinterface
type: ospfv2_interface_settings
- name: myarea2
interface_id: 1
netlink:
- destination:
- name: IP_10.3.3.1
type: host
interface_id: '2.1'
name: netlink-21.21.21.0
static_route:
- destination:
- name: Any network
type: network
interface_id: 0
network: '1.1.1.0/24'
name: myrouter # Must be element of type Router
antispoofing_network:
- destination:
- name: foonet
type: network
interface_id: 0
- name: Engine routing configuration
hosts: localhost
gather_facts: no
tasks:
- name: Remove specific antispoofing network from engine sg_vm
engine_routing:
smc_logging:
level: 10
path: ansible-smc.log
name: sg_vm
antispoofing_network:
- destination:
- name: foonet
type: network
interface_id: 0
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.
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.