sophos.sophos_firewall.sfos_web_filetype module – Manage Web File Types (Protect > Web > File Types)
Note
This module is part of the sophos.sophos_firewall collection (version 2.3.1).
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_web_filetype
.
New in sophos.sophos_firewall 2.3.0
Synopsis
Manage Web File Types (Protect > Web > File Types) 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 |
---|---|
Specify File Type Category description. |
|
Enter File Extensions to be included in the Category. |
|
Enter MIME Header to be included in the Category. |
|
Specify a name to identify the File Type Category. |
|
Use Choices:
|
Examples
- name: Create File Type Category with extensions and MIME headers
sophos.sophos_firewall.sfos_web_filetype:
name: "Custom File Type"
description: "Custom file type category for document files"
file_extension:
- "pdf"
- "doc"
- "docx"
- "txt"
mime_header:
- "application/pdf"
- "application/msword"
- "text/plain"
state: present
- name: Create File Type Category with only extensions
sophos.sophos_firewall.sfos_web_filetype:
name: "Image Files"
description: "Image file types"
file_extension:
- "jpg"
- "jpeg"
- "png"
- "gif"
state: present
- name: Query File Type Category
sophos.sophos_firewall.sfos_web_filetype:
name: "Custom File Type"
state: query
- name: Update File Type Category
sophos.sophos_firewall.sfos_web_filetype:
name: "Custom File Type"
description: "Updated description"
file_extension:
- "pdf"
- "doc"
- "docx"
- "txt"
- "rtf"
state: updated
- name: Remove File Type Category
sophos.sophos_firewall.sfos_web_filetype:
name: "Custom File Type"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Serialized object containing the API response. Returned: always |
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.