sophos.sophos_firewall.sfos_qos_policy module – Manage QoS Policies (Configure > System Services > Traffic Shaping)
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_qos_policy
.
New in sophos.sophos_firewall 2.3.0
Synopsis
Manage QoS Policies (Configure > System Services > Traffic Shaping) 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 |
---|---|
Select the type of Bandwidth usage. Choices:
|
|
Specify burstable bandwidth (maximum) for ‘Committed’ type and ‘Total’ strategy (KB). |
|
Specify burstable (maximum) download bandwidth for ‘Committed’ type and ‘Individual’ strategy (KB). |
|
Specify burstable (maximum) upload bandwidth for ‘Committed’ type and ‘Individual’ strategy (KB). |
|
Specify policy description. |
|
Specify download bandwidth for ‘Individual’ strategy and ‘Strict’ type (KB). |
|
Specify guaranteed bandwidth (minimum) for ‘Committed’ type and ‘Total’ strategy (KB). |
|
Specify guaranteed download bandwidth (minimum) for ‘Committed’ type and ‘Individual’ strategy (KB). |
|
Specify guaranteed upload bandwidth (minimum) for ‘Committed’ type and ‘Individual’ strategy (KB). |
|
Specify implementation strategy of Policy. Choices:
|
|
Specify a name for the QoS Policy. |
|
Select an option for whom the policy is created. Choices:
|
|
Select the type of Policy. Choices:
|
|
Set the Bandwidth priority. Choices:
|
|
Specify schedule-wise QoS policy details. |
|
Burstable bandwidth for this schedule rule (KB). |
|
Burstable download bandwidth for this schedule rule (KB). |
|
Burstable upload bandwidth for this schedule rule (KB). |
|
Detail ID for the schedule rule. |
|
Download bandwidth for this schedule rule (KB). |
|
Guaranteed bandwidth for this schedule rule (KB). |
|
Guaranteed download bandwidth for this schedule rule (KB). |
|
Guaranteed upload bandwidth for this schedule rule (KB). |
|
Policy type for this schedule rule. Choices:
|
|
Schedule name for this rule. |
|
Total bandwidth for this schedule rule (KB). |
|
Upload bandwidth for this schedule rule (KB). |
|
Use Choices:
|
|
Specify allowed total bandwidth for ‘Strict’ policy type and ‘Total’ implementation strategy (KB). |
|
Specify upload bandwidth for ‘Individual’ strategy and ‘Strict’ type (KB). |
Examples
- name: Create QoS Policy - Strict Total
sophos.sophos_firewall.sfos_qos_policy:
name: "Strict Total Policy"
policy_type: "Strict"
implementation_on: "Total"
priority: "BusinessCritical"
policy_based_on: "User"
bandwidth_usage_type: "Shared"
total_bandwidth: 1000
description: "Strict policy with total bandwidth control"
state: present
- name: Create QoS Policy - Committed Individual
sophos.sophos_firewall.sfos_qos_policy:
name: "Committed Individual Policy"
policy_type: "Committed"
implementation_on: "Individual"
priority: "Normal2"
policy_based_on: "Application"
bandwidth_usage_type: "Individual"
guaranteed_upload_bandwidth: 1000
burstable_upload_bandwidth: 500
guaranteed_download_bandwidth: 5000
burstable_download_bandwidth: 2000
description: "Committed policy with individual bandwidth limits"
state: present
- name: Create QoS Policy with Schedule-based Rules
sophos.sophos_firewall.sfos_qos_policy:
name: "Schedule Based Policy"
policy_type: "Strict"
implementation_on: "Total"
priority: "Normal3"
policy_based_on: "Firewall"
bandwidth_usage_type: "Shared"
total_bandwidth: 2000
description: "Policy with schedule-based bandwidth rules"
schedule_based_rules:
- detail_id: "BusinessHours"
policy_type: "Strict"
total_bandwidth: 1500
schedule: "Business Hours"
- detail_id: "OffHours"
policy_type: "Committed"
guaranteed_bandwidth: 500
burstable_bandwidth: 1000
schedule: "Off Hours"
state: present
- name: Query QoS Policy
sophos.sophos_firewall.sfos_qos_policy:
name: "Strict Total Policy"
state: query
- name: Update QoS Policy
sophos.sophos_firewall.sfos_qos_policy:
name: "Strict Total Policy"
total_bandwidth: 1500
description: "Updated strict policy"
state: updated
- name: Remove QoS Policy
sophos.sophos_firewall.sfos_qos_policy:
name: "Strict Total Policy"
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.