sophos.sophos_firewall.sfos_netflow module – Manage NetFlow configuration (System > Administration > NetFlow)
Note
This module is part of the sophos.sophos_firewall collection (version 2.1.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install sophos.sophos_firewall
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: sophos.sophos_firewall.sfos_netflow
.
New in sophos.sophos_firewall 2.1.0
Synopsis
Manage Netflow Collectors (System > Administration > NetFlow) on Sophos Firewall)
Requirements
The below requirements are needed on the host that executes this module.
sophosfirewall-python
Beginning in version 2.0.0, this module requires use of an httpapi connection plugin. See the HTTPAPI example for details.
Parameters
Parameter |
Comments |
---|---|
IP address or hostname of the NetFlow collector. Required for |
|
UDP port number for the NetFlow collector. Required for |
|
Unique identifier for the NetFlow server configuration. Required for all states except |
|
Choices:
|
Examples
- name: Add a new NetFlow server configuration 'collector1'
sophos.sophos_firewall.sfos_netflow:
state: present
server_name: "collector1"
netflow_server: "192.168.1.100"
netflow_server_port: 2055
- name: Update NetFlow server 'collector1' to a new port
sophos.sophos_firewall.sfos_netflow:
state: updated
server_name: "collector1"
netflow_server: "192.168.1.100" # Current or new IP
netflow_server_port: 2056 # New port
- name: Query all NetFlow server configurations
sophos.sophos_firewall.sfos_netflow:
state: query
register: all_netflow_configs
- name: Remove NetFlow server 'collector1'
sophos.sophos_firewall.sfos_netflow:
state: absent
server_name: "collector1"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The full API response from the Sophos Firewall for the last operation. Returned: always |
|
Whether or not the resource was changed. Returned: always |
|
A list of configured NetFlow servers. Returned when state is ‘query’. Returned: on query Sample: |
Collection links
Warning
If the firewall is a member of a group in Central, the changes made by Ansible will override the settings of the group. The actual configuration on the firewall may then differ from what is displayed for the same setting in the Central group.